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 Rocket.chat - 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!