Skip to main content

Overview

Events allow for a decoupled, flexible architecture where different parts of the application can interact without having to directly reference each other. This makes it easier to create complex, interactive experiences, as well as to extend and customize the functionality provided by the CometChat UI Kit.
The event system is identical between V5 and V6. All event classes, listeners, and APIs work the same way.

User Events

CometChatUserEvents emit events when the logged-in user executes actions on another user.
  1. ccUserBlocked: Triggered when the logged-in user blocks another user.
  2. ccUserUnblocked: Triggered when the logged-in user unblocks another user.

Group Events

CometChatGroupEvents emits events when the logged-in user performs actions related to groups.
  1. ccGroupCreated: Triggered when the logged-in user creates a group.
  2. ccGroupDeleted: Triggered when the logged-in user deletes a group.
  3. ccGroupLeft: Triggered when the logged-in user leaves a group.
  4. ccGroupMemberScopeChanged: Triggered when the logged-in user changes the scope of another group member.
  5. ccGroupMemberBanned: Triggered when the logged-in user bans a group member.
  6. ccGroupMemberKicked: Triggered when the logged-in user kicks a group member.
  7. ccGroupMemberUnbanned: Triggered when the logged-in user unbans a user.
  8. ccGroupMemberJoined: Triggered when the logged-in user joins a group.
  9. ccGroupMemberAdded: Triggered when the logged-in user adds new members.
  10. ccOwnershipChanged: Triggered when the logged-in user transfers ownership.

Message Events

CometChatMessageEvents emit events when the logged-in user executes actions on a message.
  1. ccMessageSent: Triggered when the logged-in user sends a message.
  2. ccMessageEdited: Triggered when the logged-in user edits a message.
  3. ccMessageDeleted: Triggered when the logged-in user deletes a message.
  4. ccMessageRead: Triggered when the logged-in user reads a message.
  5. ccLiveReaction: Triggered when the logged-in user sends a live reaction.
  6. ccMessageForwarded: Triggered when the logged-in user forwards a message.
  7. ccReplyToMessage: Triggered when the logged-in user replies to a message.
  8. onFormMessageReceived: Triggered when a form message is received.
  9. onSchedulerMessageReceived: Triggered when a scheduler message is received.
  10. onCustomInteractiveMessageReceived: Triggered when a custom interactive message is received.

Emitting ccMessageSent for messages you send yourself

CometChatMessageComposer emits ccMessageSent for you. If you send a message with the SDK directly — CometChat.sendCustomMessage, sendTextMessage, sendMediaMessage — you must emit it yourself, or an already-mounted CometChatMessageList will not show that message. CometChat does not deliver your own sends back to you over the real-time listener, so a list that is already on screen has no way to learn about them and only picks them up on its next fetch. That hides the problem whenever a chat screen is opened fresh each time, and surfaces it as soon as a list stays mounted — for example a chat panel kept alongside other UI.

Conversation Events

CometChatConversationEvents emits events related to conversations.
  1. ccConversationDeleted: Triggered when a conversation is deleted.
  2. ccUpdateConversation: Triggered when a conversation is updated — for example when it is marked as unread.

Call Events

CometChatCallEvents emit events when the logged-in user acts on a call. They are UI-Kit events — distinct from the Calls SDK’s own listeners — and fire for calls started or answered through the kit’s calling widgets.
  1. ccOutgoingCall: Triggered when the logged-in user initiates an outgoing call.
  2. ccCallAccepted: Triggered when the logged-in user accepts an incoming call.
  3. ccCallRejected: Triggered when the logged-in user rejects an incoming call.
  4. ccCallEnded: Triggered when a call the logged-in user was on has ended.

UI Events

CometChatUIEvents emits CometChatUIEventListener callbacks for UI-level actions such as panel visibility, active chat changes, and card action taps. Add a listener with CometChatUIEvents.addUiListener(listenerId, this) and remove it in dispose(). Event types:
The UI Kit renders card bubbles automatically (CometChatCardBubble) and emits ccCardActionClicked when a user taps an action inside one — so a single subscriber handles every card action across your app. message is a CardMessage for standalone card messages and an AIAssistantMessage for cards embedded in AI agent replies. Cast action to CometChatCardActionEvent to read its action, elementId, and cardJson. See also Methods → UI Events — Card Actions.