diff --git a/game-server/app/services/sysChatService.ts b/game-server/app/services/sysChatService.ts index 9a0696c4b..dbb934837 100644 --- a/game-server/app/services/sysChatService.ts +++ b/game-server/app/services/sysChatService.ts @@ -8,6 +8,7 @@ import { isArray, isString } from 'underscore'; import { pinus } from 'pinus'; import { resResult } from '../pubUtils/util'; import { BossInstanceType } from '../db/BossInstance'; +import { getSimpleRoleInfo } from './roleService'; async function pushNormalHeroInfoBySource(roleId: string, roleName: string, serverId: number | string, source: number, heroInfo: Partial) { const hero = pick(heroInfo, ['hName', 'hid', 'seqId', 'quality', 'star', 'starStage', 'colorStar', 'colorStarStage']); @@ -38,7 +39,8 @@ export async function pushComBtlTeamMsg(teamCode: string, roleId: string, roleNa const msgData = await createGroupMsg(roleId, roleName, CHANNEL_PREFIX.TEAM, teamCode, type, source, content, targetRoleId, targetMsgCode); if (!msgData) return null; const channel = pinus.app.get('channelService').getChannel(teamCode); - channel.pushMessage(ON_GROUP_MSG_ROUTE, resResult(STATUS.SUCCESS, msgData)); + const roleInfo = await getSimpleRoleInfo(msgData.roleId); + channel.pushMessage(ON_GROUP_MSG_ROUTE, resResult(STATUS.SUCCESS, { ...msgData, roleInfo })); return msgData; }