删除指定会话
- 删除指定会话需要通过
targetId
和 type
获取到该会话的实例。 - 调用
conversation.destory()
删除会话。
代码示例
const conversation = im.Conversation.get({
targetId: '接收方的 userId',
type: RongIMLib.CONVERSATION_TYPE.PRIVATE
});
conversation.destory().then(() => console.log('删除会话成功'));
1
2
3
4
5
6