RocketChat / RocketChat/EmbeddedChat

BUG: Message history fails to load

Open
#1,232 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
165
Forks
381
Avg merge
1d 2h
Merged PRs (30d)
1

Description

Description:

EmbeddedChat has stopped loading previous messages after the recent merges.

The client ends up calling the private room history endpoint for a public room. For example, for the public room GENERAL, it sends:

GET /api/v1/groups.messages?roomId=GENERAL

That returns 400 Bad Request, and the chat history does not load.

Steps to reproduce:
  1. Run EmbeddedChat/Storybook against a Rocket.Chat workspace that has a public room like GENERAL and at least one private room.
  2. Open a story and join any public room.
  3. Check the network tab and the chat history loading behavior.
Expected behavior:

EmbeddedChat should detect the active room type correctly and use the matching endpoint every time.

For a public room like GENERAL, it should call:

GET /api/v1/channels.messages?roomId=GENERAL

Previous messages should load normally.

Actual behavior:

EmbeddedChat calls:

GET /api/v1/groups.messages?roomId=GENERAL

That request returns 400 Bad Request, and previous messages/chat history do not load.

Screenshot
Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the message-history loading path used by EmbeddedChat/Storybook and inspect how the active room type selects its endpoint. Reproduce the issue with a public room such as GENERAL and a private room, then verify that public rooms use channels.messages, private rooms use groups.messages, and previous messages load successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.