SDKsWASMEnterprise
Get pinned messages in a conversation
Retrieve a snapshot of pinned messages in a conversation with the WASM SDK.
const { data: messages } =
await openimsdk.getConversationPinnedMsg(conversationID);
replacePinnedMessages(conversationID, messages);When the Promise resolves, data is the current conversation's pinned-message snapshot as MessageItem[]. For message fields, see Message overview.
The query does not trigger a pinning event. Deduplicate by clientMsgID, and use deletion, revocation, and modification events to update the message content. To keep the pinned set synchronized, see Pin or unpin a message.
Was this page helpful?