Skip to content

fix(react): pass the reported message to the report window in threads - #1467

Open
Jaivansh-777 wants to merge 1 commit into
RocketChat:developfrom
Jaivansh-777:fix/thread-report-crash
Open

Jaivansh-777 wants to merge 1 commit into
RocketChat:developfrom
Jaivansh-777:fix/thread-report-crash

Conversation

@Jaivansh-777

Copy link
Copy Markdown

Pass the reported message to the report window in threads

Acceptance Criteria fulfillment

  • Reporting a message inside a thread opens the report window instead of crashing
  • The report window shows the reported message, same as in the main message list
  • messageDescription no longer throws when the message is missing

Fixes #1465

Changes

  • ThreadMessageList.js: find the reported message in the thread's messages and pass it to MessageReportWindow as message, the same way MessageList does
  • ReportWindowButtons.js: messageDescription returns null when there's no message

Video/Screenshots

No visual change other than the report window opening instead of the crash. I don't have a Rocket.Chat server set up locally yet, so I'll check it on the PR preview once it's deployed and add a recording here.

PR Test Details

  • eslint on the changed files: no errors
  • prettier --check: passes
  • yarn build in packages/react: passes

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-<pr_number> after approval.

ThreadMessageList rendered MessageReportWindow without the message prop,
so ReportWindowButtons called messageDescription(undefined) and crashed
when reporting a message inside a thread. Look up the reported message
from the thread's messages (like MessageList does) and guard
messageDescription against a missing message.
@Jaivansh-777
Jaivansh-777 force-pushed the fix/thread-report-crash branch from dec8eb1 to 3c8bdfb Compare November 27, 2026 08:59

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reporting a message inside a thread crashes the chat

1 participant