红点:修改推送方式
This commit is contained in:
@@ -2,7 +2,7 @@ import { CHANNEL_PREFIX, MSG_SOURCE, CHANNEL_TYPE } from './../../../consts/cons
|
||||
import {Application, BackendSession} from 'pinus';
|
||||
import { resResult } from '../../../pubUtils/util';
|
||||
import { DEFAULT_MSG_PER_PAGE, STATUS, TASK_TYPE } from '../../../consts';
|
||||
import { createAccuseData, createGroupMsg, createPrivateMsg, getPrivateMessages, pushGroupMsgToRoom, pushMsgToRole, updatePrivateMsgReadInfo, recentPrivateChatInfos } from '../../../services/chatService';
|
||||
import { createAccuseData, createGroupMsg, createPrivateMsg, getPrivateMessages, pushGroupMsgToRoom, pushMsgToRole, updatePrivateMsgReadInfo, recentPrivateChatInfos, recentWorldMsgs, recentSysMsgs, recentGuildMsgs } from '../../../services/chatService';
|
||||
import { getSimpleRoleInfo } from '../../../services/roleService';
|
||||
import { checkTaskWithArgs } from '../../../services/taskService';
|
||||
|
||||
@@ -148,6 +148,21 @@ export class ChatHandler {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取群组聊天记录
|
||||
* @param {{}} msg
|
||||
* @param session
|
||||
*/
|
||||
async getGroupMessages(msg: {}, session: BackendSession) {
|
||||
const serverId: number = session.get('serverId');
|
||||
const guildCode: string = session.get('guildCode');
|
||||
|
||||
const worldMsgs = await recentWorldMsgs(serverId);
|
||||
const sysMsgs = await recentSysMsgs(serverId);
|
||||
const guildMsgs = await recentGuildMsgs(guildCode);
|
||||
|
||||
return resResult(STATUS.SUCCESS, { worldMsgs, sysMsgs, guildMsgs })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取私聊历史消息
|
||||
|
||||
@@ -25,6 +25,7 @@ export class GuildRemote {
|
||||
private DEMOTION = 'onDemotion';
|
||||
private PROMOTION = 'onPromotion';
|
||||
private GUILD_REC_ADD = 'onGuildRecAdd';
|
||||
private GUILD_BOSS_OPEN = 'onGuildBossOpen';
|
||||
private GATE_ACT_RANK = 'onGuildGateRankUpdate'; // 军团活动排行榜
|
||||
private CITY_ACT_RANK = 'onGuildCityRankUpdate'; // 军团活动排行榜
|
||||
private GUILD_GATE_ACT_HP = 'onGuildGateHpUpdate'; // 军团活动蛮夷入侵排行榜
|
||||
@@ -271,4 +272,14 @@ export class GuildRemote {
|
||||
this.pushMessage(guildCode, this.GUILD_RACE_EVENT, { timestamp: Date.now(), events });
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 当团长开启演武台时
|
||||
* @param guildCode
|
||||
* @param warId
|
||||
* @param bossHp
|
||||
* @param status
|
||||
*/
|
||||
public async pushBossOpen(guildCode: string, warId: number, bossHp: number, status: number) {
|
||||
this.pushMessage(guildCode, this.GUILD_BOSS_OPEN, { guildCode, warId, bossHp, status });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user