更新时间: 2021-03-08

# 删除指定会话

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

文档是否解决您的问题 ?

如果遇到产品相关问题,您可 提交工单 寻求帮助