Reporting a message inside a thread crashes the chat

Đang mở
#1,465 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Jaivansh-777 đang làm issue này rồi.

Từ ngày 27/11/2026.

  • #1467 của @Jaivansh-777 — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, react
Lĩnh vực
frontend

Hướng nghiên cứu

Start with packages/react/src/views/Thread/ThreadMessageList.js and compare how it passes the reported message with MessageList; inspect ReportWindowButtons and messageDescription for the failing call. Done means reporting a message from a thread opens the preview without crashing. A linked pull request is already open, so the work appears underway.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
Description:

Reporting a message from inside a thread crashes EmbeddedChat.

In packages/react/src/views/Thread/ThreadMessageList.js the report window is rendered as <MessageReportWindow messageId={messageToReport} />, without the message prop. MessageList passes message={reportedMessage}, but the thread view doesn't. ReportWindowButtons then calls messageDescription(message) with undefined, and if (msg.file) throws.

ChatBody renders either ThreadMessageList or MessageList, so inside a thread this is the only report window and it fails every time. There's no error boundary, so the whole widget goes blank.

Steps to reproduce:
  1. Open a thread
  2. Open the message toolbox on any message in the thread and click "Report"
Expected behavior:

The report window opens with the message preview, same as in the main chat.

Actual behavior:

TypeError: Cannot read properties of undefined (reading 'file') and the chat crashes.

I have a small fix ready (look up the reported message from the thread's messages and pass it in, plus a null check in messageDescription) and will open a PR.

Ngôn ngữ chính
JavaScript
Star
171
Fork
421
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của RocketChat/EmbeddedChat

Tất cả issue của RocketChat/EmbeddedChat

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.