会话删除后,会自动触发监听会话列表变化的监听器,得到最新的会话列表。
let friendId ='user001';
im.removePrivateConversation({
userId:friendId,
onSuccess: function () {
console.log("Remove private conversation successfully.");
},
onFailed: function (error) {
console.log("Failed to remove private conversation, code:" + error.code + " content:" + error.content);
}
});
let groupId ='group001';
im.removeGroupConversation({
groupId:groupId,
onSuccess: function () {
console.log("Remove group conversation successfully.");
},
onFailed: function (error) {
console.log("Failed to remove group conversation, code:" + error.code + " content:" + error.content);
}
});