删除会话 - GoEasy IM

会话删除后,会自动触发监听会话列表变化的监听器,得到最新的会话列表。

删除单聊会话

    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);
        }
    });

results matching ""

    No results matching ""