stream-chat-react
stream-chat-react copied to clipboard
bug: Events member.added & member.removed are ignored
Describe the bug
The channel member count change is not reflected in the UI (ChannelHeader
).
To Reproduce
Steps to reproduce the behavior:
- Add buttons for channel member addition (
channel.addMembers(["user_id"])
) or removal (channel.removeMembers(["user_id"])
) - Observe member count not changing in the `ChannelHeader
Make sure the user performing the above actions has permission UpdateChannelMembers
.
Expected behavior
On memeber.added
or member.remove
WS message arrival, reflect the member count change in the ChannelHeader
Proposed solution
Register channel.updated
event listener and update the local channel state by copying the event.channel
object.