CometChatConversationEvents
CometChatConversationEvents emits events when the logged-in user acts on a conversation object.
CometChatUserEvents
CometChatUserEvents emits events when the logged-in user acts on another user object.
CometChatGroupEvents
CometChatGroupEvents emits events when the logged-in user acts on a group object.
CometChatMessageEvents
CometChatMessageEvents emits events when the logged-in user acts on a message object. This category includes both UIKit-level events and CometChat SDK listener events.
UIKit Events
SDK Listener Events
CometChatThreadEvents
CometChatThreadEvents emits events when this client’s view of a thread’s subscription changes — whether the change was made here, on another device, or by the server.
Payload (
IThreadSubscriptionChanged)
Every emission originates in the UI Kit — a manual toggle, its revert on failure, or a mirror of an auto-subscribe the server performed. The Chat SDK emits no subscription events of its own, so this subject is the only channel.
On a matching
parentMessageId, re-render and stamp subscribed onto the message objects you hold, so your copy stays in step with the kit’s.
This is the channel that keeps the thread header control and the message action sheet in agreement without a refetch. It is also the channel to subscribe to if you build your own threads list against CometChat.ThreadsRequestBuilder.
Prefer the typed helper over subscribing to the subject directly — pass a DestroyRef and it unsubscribes with the component:
CometChatPinSaveEvents
CometChatPinSaveEvents emits events when a message is pinned, unpinned, saved, or unsaved.
It publishes on two tiers, and the split is the point:
- Server truth — a confirmed write or a realtime frame. Authoritative.
- This client’s optimism — the flip a surface applied before the server answered, and its reversal if the write failed. Not authoritative.
Server truth
Payload (
IPinSaveChanged)
This client’s optimism
Payload (
IPinChanged / ISaveChanged)
Which to subscribe to
A surface almost always wants both tiers — the optimism for immediate feedback, the truth for correctness. Four merged observables pair them per direction, so you subscribe once and cannot drift out of step:
Prefer these over the raw subjects. Each has a typed helper that takes an optional
DestroyRef and unsubscribes with your component:
Conversation pins
Conversation pinning publishes on the same two tiers.
Payloads
As with messages, prefer the merged pair over the raw subjects —
conversationPinned$ and conversationUnpinned$, or their typed helpers:
Two kinds of pin arrive on these channels, and the reach differs. A personal pin is private to the user and syncs across their own devices. An app-wide pin, made by an admin, carries
pinnedBy === "app_system" and applies to everyone — so a frame can reach a session whose user did nothing. conversation.isPinned() is true for either; use conversation.isSystemPinned() to tell them apart rather than string-comparing getPinnedBy(). Where a personal and an app-wide pin both exist, the server resolves precedence.CometChatConversations re-orders itself without these events — subscribe when you keep a list of your own.The SDK does not echo a change back to the device that made it, so
CometChatConversations publishes on its own confirmed toggle. That is why a surface should subscribe to the merged conversationPinned$ / conversationUnpinned$ rather than the raw subjects: they carry both this client’s flip and everyone else’s.CometChatCallEvents
CometChatCallEvents emits events when the logged-in user acts on a call object.
UI Events
UI events are triggered when a user interacts with UIKit elements such as buttons, menus, or input fields.Usage
Subscribe to events inngOnInit and unsubscribe in ngOnDestroy to prevent memory leaks.
When subscribing to multiple events, consider using a
Subscription container to manage all subscriptions together.