setConversationToTop

public abstract void setConversationToTop(ConversationType conversationType, String targetId, String channelId, boolean isTop, IRongCoreCallback.ResultCallback<Boolean> callback)

设置会话的置顶状态。

若会话不存在,调用此方法 SDK 自动创建会话并置顶。

Since

5.6.8

Parameters

conversationType

会话类型 io.rong.imlib.model.Conversation.ConversationType 。

targetId

会话 id。根据不同的 conversationType,可能是用户 id、讨论组 id、群组 id 或聊天室 id。

channelId

消息所属会话的业务标识。

isTop

是否置顶。

callback

设置置顶是否成功的回调。


@Deprecated()
public abstract void setConversationToTop(ConversationType conversationType, String targetId, String channelId, boolean isTop, boolean needCreate, IRongCoreCallback.ResultCallback<Boolean> callback)

Deprecated

设置会话的置顶状态。

若会话不存在,调用此方法 SDK 自动创建会话并置顶。

Since

5.1.1

Parameters

conversationType

会话类型 io.rong.imlib.model.Conversation.ConversationType 。

targetId

会话 id。根据不同的 conversationType,可能是用户 id、讨论组 id、群组 id 或聊天室 id。

channelId

消息所属会话的业务标识。

isTop

是否置顶。

needCreate

会话不存在时,是否创建会话。

callback

设置置顶是否成功的回调。