聊天:增加用户信息等字段
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user