Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-docs-android-v6-beta2.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
AI Integration Quick Reference
AI Integration Quick Reference
- Adding a listener for real-time edits when your app is running
- Fetching missed edits when your app was offline
Edit a Message
UseCometChat.edit(message:) with a TextMessage or CustomMessage object. Set the message ID on the object before calling edit.
editedAt (timestamp) and editedBy (UID of editor) fields set.
The edit() method returns a BaseMessage object (or a subclass like TextMessage).
Add/Update Tags
Usetags to update tags when editing. New tags replace existing ones.
| User | Conversation Type | Edit Capabilities |
|---|---|---|
| Message Sender | One-on-one | Own messages only |
| Message Sender | Group | Own messages only |
| Group Owner | Group | All messages |
| Group Moderator | Group | All messages |
Real-time Message Edit Events
TheonMessageEdited callback receives a BaseMessage object with the editedAt and editedBy fields set.
Missed Message Edit Events
When fetching message history, edited messages haveeditedAt and editedBy fields set. Additionally, an Action message is added to history indicating the edit.
The Action object contains:
action—editedactionOn— Updated message objectactionBy— User who edited the messageactionFor— Receiver (User or Group)
You must be the message sender or a group admin/moderator to edit a message.
Next Steps
Delete a Message
Remove messages from conversations
Send Messages
Send text, media, and custom messages
Threaded Messages
Organize conversations with message threads
Receive Messages
Listen for incoming messages in real time