GoEasyIM - 删除会话

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

删除单聊会话

    let friendId ='user001';

    let promise = im.removePrivateConversation(friendId);

    promise.then(function() {
        console.log("Remove private conversation successfully.");
    }).catch(function(error) {
        console.log("Failed to remove private conversation, code:" + error.code + " content:" + error.content);
    });

删除群聊会话


    let groupId ='group001';

    let promise = im.removeGroupConversation(groupId);

    promise.then(function() {
        console.log("Remove group conversation successfully.");
    }).catch(function(error) {
        console.log("Failed to remove group conversation, code:" + error.code + " content:" + error.content);
    });

results matching ""

    No results matching ""