GetStream / stream-chat-js

JS / Browser Client - Build Chat with GetStream.io
https://getstream.io/chat/
Other
177 stars 75 forks source link

bug: unread count number show do not correct after unmute channel #1294

Open minhth-1529 opened 3 months ago

minhth-1529 commented 3 months ago

Describe the bug

I received message from other user A, I muted that channel, user A still send message, I unmute that channel, unread count number show do not correct.

To Reproduce

https://github.com/GetStream/stream-chat-react/assets/17897146/29965ed9-69a3-4f79-88c4-e94d3725ef95

Expected behavior

show correct unread count number after unmute

Package version

arnautov-anton commented 3 months ago

Hey, @minhth-1529, the current behavior reflects that of our backend. Please see this PR for more information.

@MartinCupela the issue is still relevant but belongs to the client and before applying the fix it requires BE adjustments - could you please transfer it?

minhth-1529 commented 3 months ago

Hi @arnautov-anton, @MartinCupela I have a new issue i don't know whether it is bug or not.

I connect by using client.connectUser().then(e=>e.me.unread_channels). I want to get total unread channel count number to show on menu when user refresh page.

Like above issue, I have new message from user A (total unread channel is 1), after that I mute user A channel. unread count in user A is 0, but total unread channel from client.connectUser().then(e=>e.me.unread_channels) still 1

MartinCupela commented 3 months ago

@minhth-1529 the logic related to what happens when a user is muted is up the integrators. Please see the API docs here

image