AI Integration Quick Reference
AI Integration Quick Reference
CometChatSavedMessages lists every message the logged-in user has saved, newest save first. Unlike a
pin, a save is private and spans conversations — nobody else can see it, and the list is not scoped
to a single chat.
Where It Fits
Because the list is account-wide, this panel belongs at app level — a tab, a drawer entry, or a profile screen — not inside a single conversation.Minimal Render
There is deliberately nouser or group prop. Scoping it to one conversation would defeat the point.
- TypeScript
- JavaScript
Props
Routing a tap back to its conversation
Because the rows come from different conversations,onItemPress hands you a source alongside the
message. If you build a custom ItemView, the message itself carries the same context.
- TypeScript
- JavaScript
Reading save state yourself
- TypeScript
- JavaScript
savedAt is per-viewer. The same message reads saved for the user who saved it and unsaved for
everybody else — so isSaved() is always a statement about the logged-in user, never about the
message globally.Actions and Events
The SDK listener never fires on the device that performed the save — that device already has the
resolved message. The panel updates from the local event there, and from the SDK event everywhere
else, so a save on a phone appears on a tablet without a refresh.
Common Patterns
A saved-messages tab
- TypeScript
- JavaScript
Read-only list
- TypeScript
- JavaScript
Next Steps
Pinned Messages
The conversation-wide, everyone-sees-it counterpart
Message List
Where the Save option is raised
Save A Message (SDK)
The SDK methods underneath this component
Events
Every UI Kit event, in one place