setConversationToTop

public abstract void setConversationToTop(ConversationType conversationType, String id, boolean isTop, boolean needCreate, boolean needUpdateTime, IRongCoreCallback.ResultCallback<Boolean> callback)

Sets the pinned status of a conversation.

If the conversation does not exist, calling this method will automatically create and pin the conversation.

Since

Dedicated Cloud 5.6.2

Parameters

conversationType

The type of conversation Conversation.ConversationType.

id

The conversation ID. Depending on the conversationType, this could be a user ID, discussion group ID, group ID, or chatroom ID.

isTop

Whether to pin the conversation.

needCreate

Whether to create the conversation if it does not exist.

needUpdateTime

Whether to update the conversation's timestamp.

callback

Callback indicating whether the pinning operation was successful.


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

Sets the sticky status of a conversation.

If the conversation does not exist, calling this method will automatically create the conversation and set it as sticky.

Since

5.0.0

Parameters

conversationType

The type of conversation Conversation.ConversationType.

targetId

The ID of the conversation. Depending on the conversationType, this could be a user ID, discussion group ID, group ID, or chatroom ID.

isTop

Whether to set the conversation as sticky.

callback

Callback to indicate whether the sticky status was successfully set.


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

Deprecated

Sets the pinned status of a conversation.

If the conversation does not exist, calling this method will automatically create and pin the conversation.

Since

5.0.0

Parameters

conversationType

The type of the conversation Conversation.ConversationType.

targetId

The ID of the conversation. Depending on the conversationType, this could be a user ID, discussion group ID, group ID, or chatroom ID.

isTop

Whether to pin the conversation.

needCreate

Whether to create the conversation if it does not exist.

callback

Callback to indicate whether the pinning operation was successful.