How to opt out from receiving action messages from editing a message?

CometChat.editMessage(updatedMessage, new CometChat.CallbackListener<BaseMessage>() {

The above snippet is used for editing a message in our app but the problem is, we get an action message for every message we edit. It is possible to do the validations in the client for the chat screen by ignoring the action messages of edited type but it is not possible to not get the action message while retrieving conversations, Conversation object has the lastMessage object which returns the action message if the user edits a message.

Like to have:
A param in editMessage() that avoids sending action messages if set to true.

@aditya.gokula can you please look into this and let us know whether it’s possible?

Hello @Deepan,
Apologies for the delayed response. At our end we do not add the action messages for Message Edited and Message Deleted as the last message for the conversations. This has always been the logic at our end.
In case you are still facing this issue, please let us know and we will be happy to dig deeper into this and provide you with a solution at the earliest.


Hi @aditya.gokula

Actually, I noticed this as well. That’s why in your sample project, you have to filter messages using this code .

That said, is there any way to prevent this from happening? If there’s no way, is there a better approach to filter the messages instead of using message property of ActionMessage which is a string. I think we can use action type instead? However, it looks the action property is not working as well.

Hello @srbalan
It seems link you query has been answered for iOS here. The same can be achieved in Android as well.
Hope this helps


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.