Edit a Message
While editing a message is straightforward, receiving events for edited messages with CometChat has two parts:
- Adding a listener to receive real-time message edit events when your app is running
- Calling a method to retrieve missed message edit events when your app was not running
Edit a Message
In other words, as a sender, how do I edit a message?
In order to edit a message, you can use the editMessage()
method. This method takes an object of the BaseMessage
class. At the moment, you are only allowed to edit TextMessage
and CustomMessage
. Thus, the BaseMessage
object must either be a Text or a Custom Message.