The Great Open Source Debate with Elastic, Gluu and GitHub 🎤 Oct 27

Query Total unread notifications for user

I understand there isn’t any REST API we can use to query the total unread messages for a user across all channels/groups/DMs/etc. I also know that this question has sort of been answered here: How to get unread message via rest api in - Stack Overflow

However the answer on the stackoverflow post is only for one room at a time and I would like to know how I can get that number in the red icon in the following image:

How is this calculated? Is this number accessible somewhere in the RC mongo collections? Or is it calculated somehow which I can mimic to get it?

Thank you!

I have absolutely no idea. I would imagine calculated.

I’ll try and ask a dev for a comment.

1 Like


It’s an attribute on the subscription collection, should be readable from the REST API

subscriptions.get ` should return it

1 Like