🐞 fix(gvg): gvg频道发送
This commit is contained in:
@@ -8,6 +8,7 @@ import { checkTask } from '../../../services/task/taskService';
|
|||||||
import { RoleModel } from '../../../db/Role';
|
import { RoleModel } from '../../../db/Role';
|
||||||
import { getFriendRelationType } from '../../../services/friendService';
|
import { getFriendRelationType } from '../../../services/friendService';
|
||||||
import { GVGLeagueModel } from '../../../db/GVGLeague';
|
import { GVGLeagueModel } from '../../../db/GVGLeague';
|
||||||
|
import { getGroupIdOfServer } from '../../../services/gvg/gvgService';
|
||||||
|
|
||||||
|
|
||||||
export default function (app: Application) {
|
export default function (app: Application) {
|
||||||
@@ -37,6 +38,10 @@ export class ChatHandler {
|
|||||||
let channelId = '';
|
let channelId = '';
|
||||||
if (channel === CHANNEL_PREFIX.WORLD) channelId = `${serverId}`;
|
if (channel === CHANNEL_PREFIX.WORLD) channelId = `${serverId}`;
|
||||||
if (channel === CHANNEL_PREFIX.GUILD) channelId = guildCode;
|
if (channel === CHANNEL_PREFIX.GUILD) channelId = guildCode;
|
||||||
|
if (channel === CHANNEL_PREFIX.GVG) {
|
||||||
|
let groupId = await getGroupIdOfServer(serverId);
|
||||||
|
channelId = `${groupId}`;
|
||||||
|
}
|
||||||
if (channel == CHANNEL_PREFIX.LEAGUE) {
|
if (channel == CHANNEL_PREFIX.LEAGUE) {
|
||||||
let myLeague = await GVGLeagueModel.findLeagueByGuild(guildCode);
|
let myLeague = await GVGLeagueModel.findLeagueByGuild(guildCode);
|
||||||
if(!myLeague) return resResult(STATUS.GVG_NOT_JOIN_LEAGUE);
|
if(!myLeague) return resResult(STATUS.GVG_NOT_JOIN_LEAGUE);
|
||||||
|
|||||||
Reference in New Issue
Block a user