聊天:初始化时获取群消息
This commit is contained in:
@@ -19,7 +19,7 @@ import { GuildModel } from '../../../db/Guild';
|
||||
import { gameData } from '../../../pubUtils/data';
|
||||
|
||||
import { getMails } from '../../../services/mailService';
|
||||
import { addRoleToGuildChannel, addRoleToSysChannel, addRoleToWorldChannel, leaveGuildChannel, leaveSysChannel, leaveWorldChannel, recentPrivateChatInfos } from '../../../services/chatService';
|
||||
import { addRoleToGuildChannel, addRoleToSysChannel, addRoleToWorldChannel, leaveGuildChannel, leaveSysChannel, leaveWorldChannel, recentGuildMsgs, recentPrivateChatInfos, recentSysMsgs, recentWorldMsgs } from '../../../services/chatService';
|
||||
import { reportOneOnline } from '../../../services/timeTaskService';
|
||||
export default function (app: Application) {
|
||||
return new EntryHandler(app);
|
||||
@@ -113,6 +113,8 @@ export class EntryHandler {
|
||||
if (recentPrivateChats) {
|
||||
role['recentPrivateChats'] = recentPrivateChats;
|
||||
}
|
||||
role['worldMsgs'] = await recentWorldMsgs(role.serverId);
|
||||
role['sysMsgs'] = await recentSysMsgs(role.serverId);
|
||||
|
||||
if(role.hasGuild) {
|
||||
let userGuild = await UserGuildModel.getMyGuild(role.roleId, USER_GUILD_SELECT.ENTRY );
|
||||
@@ -120,6 +122,7 @@ export class EntryHandler {
|
||||
let guild = await GuildModel.findGuild(userGuild.guildCode, role.serverId, GUILD_SELECT.ENTRY);
|
||||
if(guild) {
|
||||
addRoleToGuildChannel(role.roleId, self.app.get('serverId'), userGuild.guildCode);
|
||||
role['guildMsgs'] = await recentGuildMsgs(userGuild.guildCode);
|
||||
role['guildAuth'] = userGuild.auth;
|
||||
role['guildCode'] = userGuild.guildCode;
|
||||
let {lv: guildLv, memberCnt} = guild;
|
||||
|
||||
Reference in New Issue
Block a user