AI Integration Quick Reference
AI Integration Quick Reference
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.
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 ofuser or group — the panel is scoped to a single conversation.
- TypeScript (User)
- TypeScript (Group)
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.
- TypeScript
- JavaScript
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 customItemView does not have to reimplement them. The SDK has no
isPinned() of its own — these are UI Kit conveniences over getPinnedAt() and getPinnedBy().
- TypeScript
- JavaScript
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
- TypeScript
- JavaScript
Read-only panel
- TypeScript
- JavaScript
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