stream-chat-react
stream-chat-react copied to clipboard
feat: The ChannelList channels are not updated when a member joins a new channel
Motivation
The ChannelList component does not show the updated list of channels that a member belongs to when the member joins a new channel
In the video below, I'm using the ChannelList component on the left. And in the Browse Space modal, on clicking "+", I call the addMembers() method on the channel. But, the channel list is not updated until I refresh
https://user-images.githubusercontent.com/42855542/161017075-e3375c4c-7787-471e-9223-2278ec989250.mov
NB: Leaving a channel updates the list.
This Codesandbox explains it better. When you leave a channel, the channel leaves the channel list (although I just noticed too that after leaving an active channel, the activeChannel which the Channel component uses stays the same...you can check that)
However, joining a channel doesn't add the channel to the channel list automatically
Proposed solution
Internally, I think the ChannelList component should handle the "MEMBER.ADDED" event, and update the list accordingly.
Acceptance Criteria
- [ ] joining a new channel updates the channel list