Closed arnautov-anton closed 5 months ago
Size Change: -560 B (0%)
Total Size: 352 kB
Filename | Size | Change |
---|---|---|
dist/browser.es.js |
76 kB | -132 B (0%) |
dist/browser.full-bundle.min.js |
46.3 kB | -94 B (0%) |
dist/browser.js |
77 kB | -98 B (0%) |
dist/index.es.js |
76 kB | -136 B (0%) |
dist/index.js |
77 kB | -100 B (0%) |
Description of the changes, What, Why and How?
Few weeks ago we received a GH issue where integrator mentions, that muting a channel with unread count
> 0
will reset unread count to zero - while that is not the case, the issue they described further still stands and that is when the state gets actually reset (upon unmuting said channel) and the page is reloaded (re-query the channels), the unread count is back where it was prior to muting/unmuting.This PR removes condition from unread counting function and removes state resetting in the
notification.channel_mutes_updated
handler. That way when the channel is unmuted the unread count represents actual value which would match the one received from the channel when re-queried.Circle back once applicable: Adjust unread count behavior for muted channels - whenever muted channel receives a new message, the unread count state should increment. Currently this is not the case and re-querying after unmuting will result in new messages not being counted as unread.
To test:
/read
is not called)Expected count of unread messages for user B on channel C: 2 Actual unread count: 1
Handlers should account for this behaviour during runtime as well and should increase unread count; meaning
_countMessageAsUnread
should be adjusted as well.Closes: GetStream/stream-chat-react#2306
TODO