stream-ruby icon indicating copy to clipboard operation
stream-ruby copied to clipboard

Allow querying for a users total unread messages count

Open ebjorklund01 opened this issue 2 years ago • 0 comments

We need a way to access a user's total unread message count from our Rails backend. The total unread count will be added to a set of other unviewed entities from our application to form a count that will be included as a badge field in a push notification payload.

Querying for a user

@client.search({members: {"$in" => [user.external_id]}}, {"user.id": user.external_id})

Doesn't show any "unread" data, and it is not clear from the documentation how we can query for an unread message count.

The stream-chat-flutter package provides a totalUnreadCountStream is it possible to access this same count from the ruby SDK?

ebjorklund01 avatar Nov 20 '23 22:11 ebjorklund01