军团活动:蛮夷入侵定时任务及推送
This commit is contained in:
@@ -5,6 +5,7 @@ import { ON_ADD_CHANNEL_ROUTE, ON_GROUP_MSG_ROUTE, ON_LEAVE_CHANNEL_ROUTE, STATU
|
||||
import { PrivateMessageType } from '../../../db/PrivateMessage';
|
||||
import { addUserToChannel, getSimpleRoleInfo } from '../../../services/roleService';
|
||||
import { ChannelUser } from '../../../domain/ChannelUser';
|
||||
import { getWorldChannelSid } from '../../../services/chatService';
|
||||
|
||||
export default function (app: Application) {
|
||||
return new ChatRemote(app);
|
||||
@@ -29,6 +30,7 @@ export class ChatRemote {
|
||||
}
|
||||
|
||||
private channelService: ChannelService;
|
||||
private GUILD_ACTIVITY_END = 'onGuildActivityEnd';
|
||||
|
||||
/**
|
||||
* 加入世界频道(分服).
|
||||
@@ -163,4 +165,16 @@ export class ChatRemote {
|
||||
public async sendPrivateMsg(msg: Partial<PrivateMessageType>) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 全服推送活动结束通知
|
||||
* @param serverId
|
||||
*/
|
||||
public async sendGuildActivityEnd(serverId: number) {
|
||||
let roomId = await getWorldChannelSid(serverId);
|
||||
let channel = this.channelService.getChannel(roomId, false);
|
||||
if (!channel) return;
|
||||
channel.pushMessage(this.GUILD_ACTIVITY_END, resResult(STATUS.SUCCESS, { }));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user