I have followed the adivce here stackoverflow aggregate answer
I am grouping posts together
(shares for same post together, likes for same posts together, regular posts as single activities). What I'm noticing, however, is that I end up with duplicates for a user.
If a user shares a post, and also likes the post, it shows up twice on their getstream feed.
Right now, I have to do filtering on my own backend service with a certain order
(If you share a post, remove the activity if you also liked it).
If you like a post, then remove the regular post.
Is there a better way to solve this problem of duplicates?