Files
mattermost/server
Doug Lauder 1f08ac5bb0 MM-69886: Refresh Channel Members RHS on websocket add and reconnect (#37584)
* MM-69886: Refresh Channel Members RHS on websocket add and reconnect

The Channel Members RHS (participant list) could omit members in two
general cases:

- On a user_added websocket event, handleUserAddedEvent recorded the
  profile-in-channel entry and loaded the profile but never loaded the
  ChannelMembership. buildProfileList drops any user without a
  membership, so a member added while the channel was open did not
  appear until the list was fully reloaded. It also affected members
  whose profile was already loaded (e.g. after they posted) but who
  still had no membership. Fetch the membership via getChannelMember
  when it is missing.

- On websocket reconnect, reconnect() reloads only the current user's
  own memberships, never the channel roster, and missed user_added /
  user_removed events are not replayed on a fresh (non-resumed)
  connection. Members added or removed while disconnected stayed stale
  until the channel was re-opened. The RHS now reloads the roster when
  the websocket connection id changes.

This extends the reconcile-on-load work from MM-68660 (PR #36964, same
loadProfilesAndReloadChannelMembers path), which pruned removals only
on channel (re)load and did not cover live adds or reconnects.

Found while re-testing MM-67616 (Shared Channels), where synced members
were not reflected in the participant list even though the server-side
sync was correct.

* Add comment to caution about changing remote cluster service ping frequency.
2026-08-11 16:44:25 -04:00
..
2026-06-29 20:33:46 +02:00
2026-04-21 02:33:20 -07:00