Feature Request: Add Trigger for Message Edited and Message Deleted Events
I would like to propose a new feature to enhance Rocket.Chat’s integration capabilities with external systems and search engines such as Elasticsearch.
Feature Request:
Add support for Triggers when a message is edited or deleted.
Currently, Rocket.Chat provides a trigger for the event message sent, which is extremely helpful for syncing new messages with external systems. However, in some use cases — especially those involving message indexing (e.g., in Elasticsearch) — it's critical to also detect and process message edits and message deletions.
Use Case:
In our setup, we maintain a mirror of Rocket.Chat messages in an external system for analytics and search. When a user edits or deletes a message in Rocket.Chat, we need a reliable trigger to:
- Detect the change
- Update or remove the corresponding entry in the external system
- Avoid inconsistencies caused by stale or incorrect data Currently, there is no official Trigger exposed for these actions, which results in data desynchronization over time.
Proposed Triggers:
-
message.updated(triggered when a message is edited) -
message.deleted(triggered when a message is deleted)
These should ideally follow a similar interface to the existing message.sent trigger, allowing apps or integrations to subscribe and respond accordingly.
Implementation Support:
I am happy to contribute to this feature and take responsibility for its implementation if the core team approves the design or provides initial guidance on the best approach to integrate with the current architecture.
Please let me know your thoughts or if you'd like me to open a formal issue or PR for further discussion.