Skip to main content
Pin and save let users mark messages for later. The two features look similar but differ in who sees the result:

Pin a Message

Pinning is conversation-wide: every participant sees the message as pinned.
Pinning is permission-gated. In a group, only the owner, admins and moderators can pin or unpin; everyone can view the pinned list. In one-to-one conversations both participants can pin.

Unpin a Message


Save a Message

Saving is private to the logged-in user and syncs across that user’s own devices. It carries no permission checks.

Unsave a Message

All four methods return the updated BaseMessage.

Message Fields

Three fields on BaseMessage carry the state:
Presence of the timestamp is the boolean. There is no separate isPinned flag — check pinnedAt != 0 and savedAt != 0. Unpinning and unsaving clear the field back to 0 rather than leaving a stale value.savedAt is per-viewer: it is only ever populated for the user who saved the message, so you cannot use it to tell whether someone else saved it.

Fetch Pinned Messages

Pinned messages are fetched with MessagesRequest filtered by pinned, scoped to a conversation with uid or guid.

Fetch Saved Messages

Saved messages are a per-user collection spanning every conversation, so the request takes no uid or guid.
Both limits are capped at 100 server-side, so a single page fetches the whole list.

Real-time Events

Implement CometChatMessageDelegate to receive pin and save updates. All four callbacks are optional and each carries the full updated message.
Register the delegate as you would for any message event — see Real-time Delegates and Listeners. Pin events are broadcast to every participant. Save events are private and reach only the saving user’s other devices.

Feature Availability

Both features are gated per app and can be checked before showing any UI:

Error Handling

For the two limit errors, read the actual cap from the exception’s errorParams rather than hard-coding a number — the limit is server-owned and may change.

Edge Cases