Browse SDKs · React Native
SDKsReact Native

Pin or unpin a conversation

Pin or unpin a conversation for the current account.

Copy

Call pinConversation() to set whether a conversation is pinned.

await OpenIMSDK.pinConversation({
  conversationID,
  isPinned: true,
});

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesConversation ID to update.
isPinnedbooleanYesSet true to pin or false to unpin.

Return result

After the call completes, the conversation's isPinned state is updated. Changes in the conversation list are delivered through OnConversationChanged; see Retrieve the conversation list.