Skip to main content
CometChatPinnedMessages lists the messages pinned in one conversation, newest pin first. A pin is conversation-wide and visible to everyone, so this panel shows the same set to every participant.
Pin Messages must be enabled for your app in the CometChat Dashboard. Until it is, the pin options never render and this panel has nothing to show. The UI Kit reads that flag itself at login and on every reconnect — there is no app code to write.

Where It Fits

Open it from the message header or an overflow menu, scoped to the conversation the user is in. It is a full-screen panel with its own back affordance rather than an inline strip.

Minimal Render

Pass exactly one of user or group — the panel is scoped to a single conversation.

Enabling the feature

Pin and Save are gated on your app’s Dashboard settings. The UI Kit resolves those flags at login and on every reconnect and switches the options on or off accordingly, so there is nothing to call at start-up. PinSaveConfig is exported for the cases where you need to read or override that resolved state — not as a switch you must throw.
You do not need to fetch these flags yourself, and you do not need to enable the feature in code. The kit resolves them at login and after every reconnect. refreshPinSaveFeatures() exists for the case where an admin flips a flag in the Dashboard while the app is running.

Props

Reading pin state yourself

The kit exports helpers so a custom ItemView does not have to reimplement them. The SDK has no isPinned() of its own — these are UI Kit conveniences over getPinnedAt() and getPinnedBy().

Actions and Events

The panel keeps itself current from the kit’s event bus, so a pin made anywhere — this screen, the message list, or another participant’s device — lands here without a manual refresh.
Removing asks, adding does not. Unpin and Unsave show a confirmation; Pin and Save run immediately. This is deliberate and consistent across all CometChat UI Kits — the additive action has its own undo one tap away, the destructive one does not.

Common Patterns

Jump to the pinned message

Read-only panel


Next Steps

Saved Messages

The private, cross-conversation counterpart

Message List

Where the Pin and Save options are raised

Pin A Message (SDK)

The SDK methods underneath this component

Events

Every UI Kit event, in one place