I’m trying to get the number of unread feed-elements for a given user, using Chatter API, but I don’t know if there is an easier way to do that.
Last API release includes some information about whether a feed element has beed readByMe or not, so that could give us the number. The downside of it would be to get all feed-elements, which are paginated, and iterate them to read readBy property.
I know there is an endpoint to get a count of unread conversation
/connect/communities/communityId/chatter/users/userId/conversations/unread-count but I’m not sure if it is what I want, I don’t know the differences between a feed-element and a conversation. Also, if I try to use this endpoint I get an error:
"You do not have permission to use Chatter Messages. Your organization may >not have permission or may not have enabled Chatter Messages. If you're >in a network, Chatter Messages may not be enabled for the network."
I’ve also tried using
/chatter/feeds/record/recordId/feed-elements, however, it's not valid either, because it is for feed groups.