会话置顶 - GoEasy IM

将指定对象的会话置顶,执行本接口后,会自动触发监听会话列表变化的监听器,得到更新后的会话列表。

置顶或取消置顶 - 私聊

    let friendId ='user001';

    im.topPrivateConversation({
        userId:friendId,
        top:true,
        onSuccess: function () { 
            console.log("Set private conversation on top successfully."); 
        },
        onFailed: function (error) { 
            console.log("Failed to set private conversation on top, code:" + error.code + " content:" + error.content);
        }
    });

置顶或取消置顶 - 群聊


    let groupId ='group001';


    im.topGroupConversation({
        groupId:groupId,
        top:true,//置顶为true, 取消置顶为false
        onSuccess: function () { 
            console.log("Set group conversation on top successfully."); 
        },
        onFailed: function (error) { 
            console.log("Failed to set group conversation on top, code:" + error.code + " content:" + error.content);
        }
    });

results matching ""

    No results matching ""