-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Bug Description
When replying to a message in a reply thread where the original (first) message has been deleted by moderation, the application encounters an error.
Steps to Reproduce
- User A posts a message
- User B replies to User A's message (creates reply thread)
- Moderator deletes User A's original message
- User C tries to reply to User B's reply (which is now replying to a deleted message)
- Application errors out
Expected Behavior
The reply system should gracefully handle cases where the original message in a reply thread has been deleted by moderation, either by:
- Showing a placeholder for the deleted message
- Gracefully degrading to show available context
- Preventing errors when accessing the deleted message data
Technical Context
The issue occurs because the reply mode tries to show the first message of the reply thread, but when that message has been deleted by moderation, the reference becomes invalid and causes an error when the system attempts to access or display it.
Impact
- Users cannot reply to messages in threads where the original message was moderated
- Potential application crashes or error states
- Degraded user experience in moderated chat environments
Additional Notes
This bug was identified during development but not immediately fixed to prioritize other features. The issue affects the reply thread functionality specifically when moderation actions remove the root message of a thread.
Location: Reply thread handling in ChatProvider.jsx and related reply components.