Skip to content

fix: resolve private channel error-room-not-found race condition#1323

Open
Aryan-Verma-999 wants to merge 1 commit into
RocketChat:developfrom
Aryan-Verma-999:fix/private-channel-race-condition
Open

fix: resolve private channel error-room-not-found race condition#1323
Aryan-Verma-999 wants to merge 1 commit into
RocketChat:developfrom
Aryan-Verma-999:fix/private-channel-race-condition

Conversation

@Aryan-Verma-999
Copy link
Copy Markdown
Contributor

@Aryan-Verma-999 Aryan-Verma-999 commented Jun 5, 2026

fix: resolve private channel error-room-not-found race condition

Acceptance Criteria fulfillment

  • Private channels load correctly for members using groups.messages endpoint
  • Public channels and anonymous mode are unaffected

Root Cause

When a user authenticated, two effects fired simultaneously:

  1. ChatHeader → getChannelInfo() → sets isChannelPrivate = true in the store
  2. ChatBody → getMessagesAndRoles() → reads isChannelPrivate (still false) → calls channels.messages instead of groups.messages → error-room-not-found

isChannelPrivate defaulted to false, making it impossible to distinguish "not loaded yet" from "confirmed public".

PR Test Details

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

Copy link
Copy Markdown
Collaborator

@Spiral-Memory Spiral-Memory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Spiral-Memory
Copy link
Copy Markdown
Collaborator

Please resolve conflicts @Aryan-Verma-999

@Aryan-Verma-999 Aryan-Verma-999 force-pushed the fix/private-channel-race-condition branch from 46b24d8 to 1828502 Compare June 6, 2026 07:54
@Aryan-Verma-999
Copy link
Copy Markdown
Contributor Author

done

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants