Goal
By the end of this guide you will have a chat screen where users can pin a message so it’s highlighted for everyone in the conversation, open a screen of all pinned messages, and save a message privately to their own list — with a dedicated “Saved” screen to review saves across every conversation. Pin and save are two separate concepts:Prerequisites
- Completed the Integration Guide
- An existing chat screen using
CometChatMessageHeader,CometChatMessageList, andCometChatMessageComposer - Pin messages and Save messages enabled for your app through the
features.ux.messages.pinned.enabledandfeatures.ux.messages.saved.enabledapp settings. See Core Features → Pin & Save.
The pin/unpin and save/unsave options only appear in the message options when the corresponding feature is enabled for your app. The UI Kit reads that setting at login and re-reads it on every reconnection, so no extra wiring is needed to show or hide the options.
Step 1: The Message Options
Once the features are enabled,CometChatMessageList automatically adds Pin, Unpin, Save, and Unsave to the message options — no props required. You only need the hide* props if you want to remove one:
File: Messages.tsx
The options are hidden on messages the server would refuse anyway — an unsent message with no ID yet, a deleted message, or one still awaiting a moderation verdict. A message sent seconds ago may briefly show no pin or save option while moderation is pending; it appears once the message is approved.
Step 2: Open the Pinned Messages Screen
CometChatMessageHeader can show a pinned-messages button. Set showPinnedMessagesButton and wire onPinnedMessagesPress to navigate to CometChatPinnedMessages, scoped to the same user/group.
File: Messages.tsx
CometChatPinnedMessages is per conversation — it takes the same user or group the chat screen was opened with, and lists that conversation’s pinned messages newest-pin first.

Step 3: Add a “Saved” Screen
CometChatSavedMessages is user-level, not per conversation — it lists everything the logged-in user has saved, across every chat. There is no built-in entry point, so open it from your own navigation: a menu item, a profile screen, or a tab.

source carries that conversation as receiverType ("user" or "group") and receiverId, plus name, label and an optional avatar — see the component reference.
Step 4: Pinned & Saved Indicators
No wiring needed.CometChatMessageList renders a pin glyph and a filled bookmark in the message’s meta row, beside the timestamp, and keeps them in sync in real time:
- Pin is conversation-wide, so every participant sees the indicator appear and disappear as the message is pinned or unpinned.
- Save is private, so the indicator appears only for the user who saved it — and syncs to that user’s other devices.
Step 5: Limits
Both features are capped by the server, per app:
When a cap is reached, the action is rejected and the UI Kit shows a toast carrying the server-provided limit — the number is never hard-coded in the kit, so raising the cap for your app changes the message automatically.
Complete Example
File: Messages.tsxgoToMessageId is what makes the jump actually happen: CometChatMessageList fetches the page around that ID and scrolls to it, so tapping a pinned or saved row lands on the message in its original conversation.
Next Steps
- CometChatPinnedMessages — the full component reference
- CometChatSavedMessages — the full component reference
- Pin Message (SDK) — the underlying SDK methods and listeners
- Save Message (SDK)
- Pin Conversation — pinning a whole chat to the top of the list