聊天:增加用户信息等字段

This commit is contained in:
liangtongchuan
2021-03-17 18:05:48 +08:00
parent 76aee57e67
commit 94ca8614b4
5 changed files with 43 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ import {Application, BackendSession} from 'pinus';
import { resResult } from '../../../pubUtils/util';
import { DEFAULT_MSG_PER_PAGE, STATUS } from '../../../consts';
import { createAccuseData, createGroupMsg, createPrivateMsg, getPrivateMessages, pushGroupMsgToRoom, pushMsgToRole, updatePrivateMsgReadInfo } from '../../../services/chatService';
import { getSimpleRoleInfo } from '../../../services/roleService';
export default function(app: Application) {
@@ -129,7 +130,8 @@ export class ChatHandler {
const roleId = session.get('roleId');
const { targetRoleId, fromSeqId = Infinity, count = DEFAULT_MSG_PER_PAGE } = msg;
const msgs = await getPrivateMessages(roleId, targetRoleId, fromSeqId, count);
return resResult(STATUS.SUCCESS, { targetRoleId, msgs });
const targetRoleInfo = await getSimpleRoleInfo(targetRoleId);
return resResult(STATUS.SUCCESS, { targetRoleId, msgs, targetRoleInfo });
}
/**