GoEasyIM - 消息置顶

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

置顶或取消置顶 - 私聊

    let friendId ='user001';

    let promise = im.topPrivateConversation(friendId,true);  //置顶为true, 取消置顶为false

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

置顶或取消置顶 - 群聊


    let groupId ='group001';

    let promise = im.topGroupConversation(groupId, true);  //置顶为true, 取消置顶为false

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

results matching ""

    No results matching ""