聊天:举报接口及测试
This commit is contained in:
@@ -11,6 +11,7 @@ import { CHANNEL_PREFIX, MSG_CODE_LEN, MSG_STATUS, ON_PRIVATE_MSG_ROUTE, RECENT_
|
||||
import { getRoleOnlineInfo } from './redisService';
|
||||
import { ChatInfoModel } from '../db/ChatInfo';
|
||||
import { channelServer } from './chatChannelService';
|
||||
import { AccuseRecModel, AccueseParam } from '../db/AccuseRec';
|
||||
|
||||
export * from './chatChannelService';
|
||||
export * from './sysChatService';
|
||||
@@ -295,3 +296,11 @@ export async function pushTeamInviteMsg(roleId: string, roleName: string, server
|
||||
await pushGroupMsgToRoom(msgData);
|
||||
return msgData;
|
||||
}
|
||||
|
||||
export async function createAccuseData(roleId: string, targetRoleId: string, targetMsgCode: string, reason: number) {
|
||||
const data: AccueseParam = {
|
||||
roleId, targetRoleId, targetMsgCode, reason
|
||||
};
|
||||
const result = await AccuseRecModel.createRec(data);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user