后台:军团活动debug

This commit is contained in:
luying
2021-10-14 17:33:35 +08:00
parent 0dc178b155
commit 2b6b941649
9 changed files with 227 additions and 22 deletions
+10 -1
View File
@@ -9,7 +9,7 @@ import { GroupMessageParam, GroupMessageType } from '../db/GroupMessage';
import { genCode, resResult } from '../pubUtils/util';
import { pinus } from 'pinus';
import { CHANNEL_PREFIX, MSG_CODE_LEN, MSG_STATUS, ON_PRIVATE_MSG_ROUTE, MSG_TYPE, MSG_SOURCE } from '../consts';
import { getRoleOnlineInfo } from './redisService';
import { getAllServers, getRoleOnlineInfo } from './redisService';
import { ChatInfoModel } from '../db/ChatInfo';
import { channelServer } from './chatChannelService';
import { AccuseRecModel, AccueseParam } from '../db/AccuseRec';
@@ -397,4 +397,13 @@ export async function checkFilterWords(word: string) {
}
return hasBlock;
}
export async function pushCurrentTime(time: number) {
let serverlists = await getAllServers()
for(let serverId of serverlists) {
let roomId = groupRoomId(CHANNEL_PREFIX.WORLD, serverId);
const channelSid = await channelServer(roomId);
await pinus.app.rpc.chat.chatRemote.pushCurrentTime.toServer(channelSid, serverId, time);
}
}