I'm in the process of setting up an integration with GetStream where I've set up a notification feed for our users to follow flat feeds (products, other users, etc). I'm grouping activities by {id}
as suggested in How to filter out previously seen and read activities while retrieving notifications? so that once a user has read an activity, it should never show up again in their feed.
I'd like to be able to filter the retrieval of activities to exclude read activities. I can't find anything in the API docs that suggest this is possible. If it truly is not, how best to reasonably retrieve feed activities without many calls to the API once there is a significant number of activities in some of the followed feeds?
Thanks in advance for the help!
As we explained it in How to filter out previously seen and read activities while retrieving notifications?, read state "is_read" and seen state "is_seen" are kept at the activity group level ('activities' field in the API response) and its resets from read/seen (is_read=true) to unread/unseen (is_seen=false) each time the group is updated (when a new activity is added or updated).
However, it's not possible to only retrieve the unread/unseen activities in a group as the get() method to retrieve activities from a notification feed does not support filtering activities by "is_read" or "is_seen" field.
It's yet possible for you to retrieve every activity group and filter those activities yourself by implementing your own method to exclude previous read/seen activities from the notification feed.
Let us know if you have other questions.
Best regards,