stream-chat-js
stream-chat-js copied to clipboard
BUG: unread_messages return incorrect in read state
In read state, last_read_message_id is always true (with the actual id I marked via API channel.markRead({ message_id: messageId })) But sometimes, unread_messages return incorrect, always = 0
Some specific cases:
- actual unread_messages > 99: I have 120 unread messages, then I go to the detail screen, the my code will call markRead with the id of the next 15th message (every time I go in details, the default is to call and mark 15 messages as read). When I go back to the list screen, unread_messages should be = 105, but it returns = 0. This error can always be reproduced, please see the video below
- when the last message is a system message
- in some cases, for reasons I don't know, when I actually have 50-60 unread messages, it also returns = 0.
I am using: "stream-chat": "8.14.4", but when I updated to "8.33.1", this bug is still
https://github.com/user-attachments/assets/6186146c-938a-4479-be80-e1a561891a17