🐞 fix(gvg): 修复gvg显示问题
This commit is contained in:
@@ -9,6 +9,7 @@ import { RoleModel } from '../../../db/Role';
|
||||
import { getFriendRelationType } from '../../../services/friendService';
|
||||
import { GVGLeagueModel } from '../../../db/GVGLeague';
|
||||
import { getGroupIdOfServer } from '../../../services/gvg/gvgService';
|
||||
import { getGuildCodeString } from '../../../services/gvg/gvgRecService';
|
||||
|
||||
|
||||
export default function (app: Application) {
|
||||
@@ -35,7 +36,7 @@ export class ChatHandler {
|
||||
const guildCode = session.get('guildCode');
|
||||
|
||||
const sid = session.get('sid');
|
||||
let channelId = '';
|
||||
let channelId = '', otherInfo = '';
|
||||
if (channel === CHANNEL_PREFIX.WORLD) channelId = `${serverId}`;
|
||||
if (channel === CHANNEL_PREFIX.GUILD) channelId = guildCode;
|
||||
if (channel === CHANNEL_PREFIX.GVG) {
|
||||
@@ -46,8 +47,9 @@ export class ChatHandler {
|
||||
let myLeague = await GVGLeagueModel.findLeagueByGuild(guildCode);
|
||||
if(!myLeague) return resResult(STATUS.GVG_NOT_JOIN_LEAGUE);
|
||||
channelId = myLeague.leagueCode;
|
||||
otherInfo = getGuildCodeString(myLeague);
|
||||
}
|
||||
const msgData = await createGroupMsg(roleId, roleName, channel, channelId, type, MSG_SOURCE.ROLE_SEND_TEXT, content, targetRoleId, targetMsgCode);
|
||||
const msgData = await createGroupMsg(roleId, roleName, channel, channelId, type, MSG_SOURCE.ROLE_SEND_TEXT, content, targetRoleId, targetMsgCode, otherInfo);
|
||||
if (!msgData) return resResult(STATUS.WRONG_PARMS);
|
||||
await pushGroupMsgToRoom(msgData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user