stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

bug: Events member.added & member.removed are ignored

Open MartinCupela opened this issue 2 years ago • 0 comments

Describe the bug

The channel member count change is not reflected in the UI (ChannelHeader).

To Reproduce

Steps to reproduce the behavior:

  1. Add buttons for channel member addition (channel.addMembers(["user_id"])) or removal (channel.removeMembers(["user_id"]))
  2. 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.

MartinCupela avatar Jul 04 '22 13:07 MartinCupela