AI Integration Quick Reference
AI Integration Quick Reference
Send Message in a Thread
Any message type (Text, Media, or Custom) can be sent in a thread. Set theparentMessageId property to indicate which thread the message belongs to.
Send Text Message in Thread
Send Media Message in Thread
Send Custom Message in Thread
Receiving Real-Time Messages
UseCometChatMessageDelegate to receive real-time thread messages. Check if the received message belongs to the active thread using parentMessageId.
Fetch all the messages for any particular thread
UseMessagesRequestBuilder with setParentMessageId() to fetch messages belonging to a specific thread. The fetchPrevious() method returns an array of BaseMessage objects representing thread replies.
Avoid Threaded Messages in User/Group Conversations
UsehideReplies(hide: true) to exclude threaded messages when fetching messages for a conversation. The response is an array of BaseMessage objects, excluding any messages that are replies within a thread.
- Swift (User)
- Swift (Group)
Next Steps
Send Messages
Send text, media, and custom messages to users and groups
Receive Messages
Listen for incoming messages in real-time and fetch missed messages
Reactions
Add emoji reactions to messages
Message Filtering
Advanced message filtering with RequestBuilder