Skip to content

BUG: Message history fails to load #1232

@Aryan-Verma-999

Description

@Aryan-Verma-999

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions