Browse SDKs · Flutter
SDKsFlutterEnterprise

Pin or unpin a message

Use the Flutter SDK to pin or unpin a message in a conversation.

Copy
await OpenIM.iMManager.messageManager.setConversationPinnedMsg(
  conversationID: conversationID,
  clientMsgID: clientMsgID,
  pinned: true,
);

Pass false to unpin the message. Future completion does not mean that its event has arrived. onChangedPinnedMsg is the event owned by this page and belongs in the application's single OnAdvancedMsgListener. Replace the collection for its conversationID, then deduplicate by detail.msg.clientMsgID. See Event overview for listener configuration.