AI Integration Quick Reference
AI Integration Quick Reference
Overview
The v7 event system merges CometChat SDK listener events (from the network) with local UI events (from component actions) into a single pub/sub bus. Components subscribe to events they care about and publish events when they perform actions that other components need to know about. This replaces v6’s RxJS-basedCometChatMessageEvents, CometChatGroupEvents, etc. with a single unified system.
How It Works
- SDK listeners are attached when
CometChatEventsProvidermounts (after login) - When the SDK fires a listener callback, it’s converted to a typed event and emitted to all subscribers
- Components can also publish UI events for local cross-component communication
- All subscribers receive all events — filter by
event.typein your handler
Subscribing to Events
Use theuseCometChatEvents hook to subscribe:
Publishing UI Events
Use theusePublishEvent hook to publish events that other components can react to:
ui: prefixed events can be published by components. SDK events are emitted internally by the provider.
SDK Events
These events originate from the CometChat SDK (network). They fire when other users perform actions.Message Events
Receipt Events
Reaction Events
Typing Events
User Events
Group Events
Call Events
Connection Events
UI Events
These events are published by UI Kit components for local cross-component communication within the same tab.Message Lifecycle
Composer Commands
Conversation State
User & Group Actions
Thread
Call Actions
Navigation
Card Actions
Published when a user clicks an action (button, link, etc.) inside a card message bubble. The kit performs no behavior — it forwards the raw
action and its message to your app, so you own all action handling. This is the only channel that can reach a kit-instantiated card (e.g. a nested agent card) where no prop is reachable.