聊天:精简未读消息数的处理逻辑
This commit is contained in:
@@ -2,7 +2,7 @@ import { CHANNEL_PREFIX, MSG_SOURCE } from './../../../consts/constModules/chatC
|
||||
import {Application, BackendSession} from 'pinus';
|
||||
import { resResult } from '../../../pubUtils/util';
|
||||
import { DEFAULT_MSG_PER_PAGE, STATUS } from '../../../consts';
|
||||
import { createGroupMsg, createPrivateMsg, getPrivateMessages, groupRoomId, pushGroupMsgToRoom, pushMsgToRole, updatePrivateMsgReadTime } from '../../../services/chatService';
|
||||
import { createGroupMsg, createPrivateMsg, getPrivateMessages, pushGroupMsgToRoom, pushMsgToRole, updatePrivateMsgReadInfo } from '../../../services/chatService';
|
||||
|
||||
|
||||
export default function(app: Application) {
|
||||
@@ -136,7 +136,7 @@ export class ChatHandler {
|
||||
async readPrivateMessage(msg: { targetRoleId: string }, session: BackendSession) {
|
||||
const roleId = session.get('roleId');
|
||||
const { targetRoleId } = msg;
|
||||
const result = await updatePrivateMsgReadTime(roleId, targetRoleId);
|
||||
const result = await updatePrivateMsgReadInfo(roleId, targetRoleId);
|
||||
if (!result) {
|
||||
return resResult(STATUS.UPDATE_PRIVATE_MSG_READ_TIME_ERR);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user