Reporting a message inside a thread crashes the chat

Abierto
#1,465 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Jaivansh-777 ya está trabajando en esto.

Desde el 27/11/2026.

  • #1467 de @Jaivansh-777 — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
javascript, react
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
171
Forks
421
Merge medio
3 d 6 h
PR fusionados (30 d)
4

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RocketChat/EmbeddedChat

Todos los issues de RocketChat/EmbeddedChat

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.