You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement functionality that allows users to edit or delete their messages in chat rooms. This will enhance user experience by allowing corrections and removals.
Requirements:
API Endpoints: Extend existing APIs to handle the editing and deleting of messages. The operations should be restricted to the original message author.
Sample API Extensions:
PUT /message/:messageID/edit
DELETE /message/:messageID/delete
Event Types: Define event types to communicate message edit and delete actions.
EventTypeMessageEdited: Message has been edited.
EventTypeMessageDeleted: Message has been deleted.
WebSocket Notification: Notify room participants of any message edits or deletes via WebSockets.
Database Changes: Ensure the edited message is updated in the database, and deleted messages are either removed or flagged as deleted, depending on your data retention policy.
Client-Side Behavior: Update the frontend to reflect these changes in real-time without requiring a page reload. (Note: While this task focuses on the backend, the frontend will also need adjustments.)
Testing: Include unit and integration tests to confirm that the feature functions as expected.
Success Criteria:
Users should be able to edit their own messages.
Users should be able to delete their own messages.
All participants in the room should be notified of these actions in real-time.
The text was updated successfully, but these errors were encountered:
Implement functionality that allows users to edit or delete their messages in chat rooms. This will enhance user experience by allowing corrections and removals.
Requirements:
API Endpoints: Extend existing APIs to handle the editing and deleting of messages. The operations should be restricted to the original message author.
Sample API Extensions:
EventTypeMessageEdited: Message has been edited.
EventTypeMessageDeleted: Message has been deleted.
WebSocket Notification: Notify room participants of any message edits or deletes via WebSockets.
Success Criteria:
The text was updated successfully, but these errors were encountered: