Edit a Message
Overview#
Edit message is a feature which allows you to edit the content of your previously sent Text Messages and Captions associated with Media (image or video) in your chat conversation.
Note : User can edit only
SentMessages.
Edit Text Message#
To Edit your text message, you need to pass the EditMessage object as an argument to the parameter in the editTextMessage() method.
- Java
- Kotlin
| Argument | Type | Description |
|---|---|---|
| EDIT_MESSAGE_PARAMS | EditMessage | Object to hold the parameters of the Edit Message |
| CALLBACK | SendMessageCallback | callback to observe the action status |
info
When a message is being edited, onMessageEdited event will be triggered. Based on this event, update the message and refresh the UI.
Edit Media Caption Message#
To Edit your media caption message, you need to pass the EditMessage object as an argument to the parameter in the editMediaCaption() method.
- Java
- Kotlin
| Argument | Type | Description |
|---|---|---|
| EDIT_MESSAGE_PARAMS | EditMessage | Object to hold the parameters of the Edit Message |
| CALLBACK | SendMessageCallback | callback to observe the action status |
info
When a message is being edited, onMessageEdited event will be triggered. Based on this event, update the message and refresh the UI.