聊天:测试机制,添加部分接口的壳子

This commit is contained in:
liangtongchuan
2021-03-03 20:45:54 +08:00
parent 3f2f4d410b
commit fd5df13be1
2 changed files with 82 additions and 0 deletions

View File

@@ -69,4 +69,43 @@ export class ChatHandler {
}]);
}
}
/**
* @description 群聊发送接口
* @param {{ channel: string, type: number, content: string, targetRoleId: string, targetMsgCode: string }} msg
* @param {BackendSession} session
* @memberof ChatHandler
*/
async sendGroupMessage(msg: { channel: string, type: number, content: string, targetRoleId: string, targetMsgCode: string }, session: BackendSession) {
const { channel, type, content, targetRoleId, targetMsgCode } = msg;
}
/**
* @description 私聊发送接口
* @param {{ type: number, content: string, targetRoleId: string, targetMsgCode: string }} msg
* @param {BackendSession} session
* @memberof ChatHandler
*/
async sendPrivateMessage(msg: { type: number, content: string, targetRoleId: string, targetMsgCode: string }, session: BackendSession) {
const { type, content, targetRoleId, targetMsgCode } = msg;
}
/**
* @description 获取初始聊天消息,数据和登录时返回的一致
* @param {{}} msg
* @memberof ChatHandler
*/
async getInitMessage(msg: {}) {
}
/**
* @description 获取私聊历史消息
* @param {{targetRoleId: string, fromSeqId: number, count: number}} msg 聊天对象;聊天消息的顺序 id不传为从最新开始count 为消息条数
* @memberof ChatHandler
*/
async getPrivateMessage(msg: {targetRoleId: string, fromSeqId: number, count: number}) {
}
}