Skip to main content

Emit Real-Time Message Update Events for Moderation Block Actions

Problem

Currently, when a message is blocked through Moderation, the backend correctly updates the message state by:

  • Marking the message as blocked for the sender.

  • Converting the message to sender-only, preventing receivers from accessing it.

However, this change is only persisted at the data layer. No real-time event is emitted to connected clients, so:

  • Receivers continue to see the original message until they refresh or reconnect.

  • Senders do not immediately see the message updated to its blocked state.

The correct state is reflected only after the conversation is re-fetched.

Proposed Enhancement

Enhance the Moderation flow to emit a real-time message update event whenever a message is blocked. This event should notify all connected clients so they can immediately update the UI.

Expected Behavior

  • Sender: The message should instantly update to the "blocked" state.

  • Receivers: The message should be removed or updated immediately based on the sender-only visibility rules.

  • No manual refresh or reconnection should be required for the changes to be reflected.

1 comment

Log in to comment and vote

Comments1

  • Salmon Jaguar

    This is very important for us, because it can display not desired information in the chat until the user refreshes the page.