Browse SDKs · Flutter
Platform
SDKsFlutterEnterprise

Retrieve pinned conversation messages

Use the Flutter SDK to retrieve the list of pinned messages in a conversation.

Copy

Retrieve a snapshot of all messages currently pinned in the specified conversation:

Parameters

ParameterTypeRequiredDescription
conversationIDStringYesTarget conversation ID.

Code example

final messages = await OpenIM.iMManager.messageManager
    .getConversationPinnedMsg(conversationID: conversationID);
replacePinnedMessages(conversationID, messages);

Return value

Returns a Future resolving to a list of pinned messages (List<Message>) in the conversation.

This response does not include pin metadata such as the operator ID or pinning timestamp.

State changes after the call

This query retrieves a point-in-time snapshot and does not trigger event callbacks. Replace the local pinned message state for the conversationID with the returned list, deduplicating items by non-empty clientMsgID. For pinning operations and real-time event updates, see Pin or unpin a message.