Commit 56e0cdb1 by 杨铁龙

feat:设置消息为未读

parent a08b2362
Showing with 5 additions and 1 deletions
......@@ -300,6 +300,10 @@ export class Xim {
return this.client?.syncReadMsg(chatId, start_msg_id, end_msg_id);
}
public setUnRead(chatId: number) {
return this.client?.unreadChat(chatId);
}
private parseEventListener(...args: any[]): [string, Function] {
if (args.length < 2) {
throw new Error("参数个数不正确");
......@@ -312,7 +316,7 @@ export class Xim {
private onConnected() {
if (this.client == null) return;
// 连接成功后,需要调用pubUserInfo, 否则服务端会认为此连接无效
this.client.pubUserInfo(JSON.stringify({org_id: chat.getOrgId()}));
this.client.pubUserInfo(JSON.stringify({ org_id: chat.getOrgId() }));
this.debug("xim connected");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment