Reporting a message inside a thread crashes the chat

Aperta
#1,465 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Jaivansh-777 ci sta già lavorando.

Dal 27/11/2026.

  • #1467 di @Jaivansh-777 — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
javascript, react
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
171
Fork
421
Merge medio
3g 6h
PR unite (30g)
4

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RocketChat/EmbeddedChat

Tutte le issue di RocketChat/EmbeddedChat

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.