AI Integration Quick Reference
AI Integration Quick Reference
Components
Integration Steps
1. Thread View Screen
Create a dedicated screen for threaded messages that receives the parent message via navigation params.2. Trigger Thread View from Messages
In your main messages screen, handle theonThreadRepliesPress callback to navigate to the thread view.
3. Navigation Setup
Configure React Navigation to include the ThreadView screen.4. Navigate to Specific Message in Thread
Support navigating to a specific message within a thread usinggoToMessageId prop.
5. Handle Blocked Users in Threads
Show an unblock prompt when the user is blocked instead of the composer.Thread Subscription
Users can subscribe to a thread to keep getting updates about new replies even when they aren’t actively viewing it, and unsubscribe to stop. This works in both 1-1 and group conversations. The UI Kit surfaces it in two places, both wired out of the box:- A bell in
CometChatMessageHeader, shown once the header is given aparentMessage. - A subscribe / unsubscribe option in the message options of
CometChatMessageList.
On React Native the bell is on CometChatMessageHeader, not
CometChatThreadHeader. The landed design places it in the thread screen’s top bar rather than in the reply-count row, so parentMessage is what puts the header in thread mode and renders it.Automatic subscription
Beyond the manual bell and message option, the UI Kit subscribes a user to a thread automatically in a few cases, so people keep getting updates on threads they are actually part of — without having to remember to follow them:- Sending a message subscribes you to its thread. Sending a reply inside a thread subscribes you to that thread as well.
- Being @mentioned in a reply subscribes you, whether the mention is added on a fresh reply or introduced by an edit.
- A reply from someone else that does not mention you does not subscribe you. You are only pulled in when you author something in the thread or you are mentioned.
Reacting to changes
PassonThreadSubscriptionChange to the message header to run your own logic when the user subscribes or unsubscribes:
Hiding the controls
Each surface is hidden independently — an integrator may want one and not the other.threadSubscriptionVisibilityonCometChatMessageHeaderremoves the bell.hideThreadSubscriptionOptiononCometChatMessageListremoves the message option.
Feature Matrix
Next Steps
Message List
Render real-time message threads.
Thread Header
Customize the thread header component.
All Guides
Browse all feature and formatter guides.
Sample App
Full working sample application on GitHub.