✨ feat(兼容): 配表使用后台隐藏物品
This commit is contained in:
@@ -2,7 +2,7 @@ import { Channel, pinus } from "pinus";
|
||||
import { CHANNEL_PREFIX, PUSH_BATCH, PUSH_INTERVAL, PUSH_ROUTE, STATUS } from "../consts";
|
||||
import { genCode, resResult } from "../pubUtils/util";
|
||||
import { getCityChannelSid, getGuildChannelSid, getWorldChannelSid, groupRoomId, getGroupShopSid } from "./chatService";
|
||||
import { getAllOnlineRoles, getRoleOnlineInfo } from "./redisService";
|
||||
import { getAllOnlineRoles, getAllServers, getRoleOnlineInfo } from "./redisService";
|
||||
import { errlogger, infologger } from '../util/logger';
|
||||
import { MsgEncrypt } from "../pubUtils/sysUtil";
|
||||
import { isSkipEncode } from "../pubUtils/sdkUtil";
|
||||
@@ -34,6 +34,13 @@ export async function sendMessageToAll(route: string, data: any, filterCb?: ({ l
|
||||
}, PUSH_INTERVAL);
|
||||
}
|
||||
|
||||
export async function sendMessageToAllServersWithSuc(route: string, data: any) {
|
||||
let servers = await getAllServers();
|
||||
for(let serverId of servers) {
|
||||
await sendMessageToServerWithSuc(serverId, route, data);
|
||||
}
|
||||
}
|
||||
|
||||
export async function sendMessageToServerWithSuc(serverId: number, route: string, data: any, isBatch = false) {
|
||||
await sendMessageToServer(serverId, route, resResult(STATUS.SUCCESS, data), isBatch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user