聊天:最近私聊历史相关逻辑

This commit is contained in:
liangtongchuan
2021-03-10 12:49:12 +08:00
parent 253efb4966
commit 41025cacf9
5 changed files with 75 additions and 8 deletions
@@ -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 } from '../../../services/chatService';
import { addRoleToGuildChannel, addRoleToSysChannel, addRoleToWorldChannel, leaveGuildChannel, leaveSysChannel, leaveWorldChannel, recentPrivateChatInfos } from '../../../services/chatService';
import { reportOneOnline } from '../../../services/timeTaskService';
export default function (app: Application) {
return new EntryHandler(app);
@@ -109,6 +109,11 @@ export class EntryHandler {
role['apJson'] = apJson;
role['mails'] = mails;
const recentPrivateChats = await recentPrivateChatInfos(role.roleId, role.roleName);
if (recentPrivateChats) {
role['recentPrivateChats'] = recentPrivateChats;
}
if(role.hasGuild) {
let userGuild = await UserGuildModel.getMyGuild(role.roleId, USER_GUILD_SELECT.ENTRY );
if(userGuild) {