Skip to content

BUG: unread_messages return incorrect in read state #1343

@thaindangelhack

Description

@thaindangelhack

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

screen-recording-2024-08-23-at-160958_OByEfuhF.1.mp4

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions