Skip to content

Reply thread error when original message is deleted by moderation #38

@BP602

Description

@BP602

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

  1. User A posts a message
  2. User B replies to User A's message (creates reply thread)
  3. Moderator deletes User A's original message
  4. User C tries to reply to User B's reply (which is now replying to a deleted message)
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions