Skip to content

fix: refresh room information when room settings change - #1415

Open
ankitjha1405 wants to merge 1 commit into
RocketChat:developfrom
ankitjha1405:fix/1119-live-room-info
Open

ankitjha1405 wants to merge 1 commit into
RocketChat:developfrom
ankitjha1405:fix/1119-live-room-info

Conversation

@ankitjha1405

@ankitjha1405 ankitjha1405 commented Nov 3, 2026 •

Copy link
Copy Markdown

fix: refresh room information when room settings change

Acceptance Criteria fulfillment

  • Room topic, announcement, description and privacy changes show up in the Room Information sidebar without a refresh
  • The header (room name, topic, private/public icon) updates without a refresh
  • No manual refresh is needed

Fixes #1119

What changed

ChatHeader now listens for incoming room-change system messages (r, room_changed_topic, room_changed_announcement, room_changed_description, room_changed_privacy). When one arrives, it calls rooms.info again and writes the result to channelStore. The header and Room Information both read channelInfo from that store, so both re-render with the new values. isChannelPrivate is also set from the fresh room, so a private-to-public change works too, not only public-to-private.

The listener uses the existing addMessageListener / removeMessageListener API and is removed on unmount and logout. Only live stream messages reach these listeners, so loading message history does not trigger extra requests.

One file, 23 lines added.

Video/Screenshots

Not recorded yet. I will add a recording from the PR preview build.

PR Test Details

  • prettier --check (2.8.8) passes on the changed file.
  • ESLint with the package's .eslintrc.json: no new errors or warnings. The two react-hooks/exhaustive-deps warnings in this file were already there before the change.
  • Not tested yet against a live Rocket.Chat server. Steps: open a room in EmbeddedChat, open Room Information, then change the topic, description, announcement, name or privacy from the Rocket.Chat web client. The header and sidebar should update without a reload.

AI assistance: I used Claude (Anthropic) to find this issue, trace the code and write the change. I have read and understand every line.

Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-1415 after approval. Contributors are requested to replace <pr_number> with the actual PR number.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Room information changes are notified but not reflected in the Room Information sidebar

2 participants