Reporting GetStream.io bug with unread messages

Profile Picture
Published on Oct 18, 2019🌏 Public

I'm using livestream channel type.

How to reproduce:

  • Create a channel server-side with user A as a watcher

  • Chat in this channel with user B

  • total_unread_counts is always 0:

const r = await client.setUser(userA, userAToken);
console.log(`you have ${r.me.total_unread_count} unread messages on ${r.me.unread_channels} channels`);
// you have 0 unread messages on 0 channels
chatClient.on(event => {
  if (event.total_unread_count !== undefined) {
    console.log(`you have ${event.total_unread_count} unread messages`)
    // you have 0 unread messages
  }
})