Browse SDKs · WASM
SDKsWASM

Pin or unpin a conversation

Set whether a conversation is pinned in the current user’s conversation list.

Copy

isPinned changes only the sort state in the current user's conversation list. It does not affect other group members or the other user in a one-to-one chat.

await openimsdk.setConversation({
  conversationID,
  isPinned: true,
});

Pass true to pin the conversation and false to unpin it. A successful Promise means that the setting request has completed. Merge the latest conversation from OnConversationChanged by conversationID; see Get the conversation list for the complete listener.