Hi I've a Post model with owner, and an Answer model with all answers from that Post. How can I use Getstream.io to create streams that will result in the following:
"Julie, Frank and 20 more answer your post" ( you're the post owner)
"Julie post a new Answer in post XXX " ( you're Frank)
Feed Groups per entity
Any feed type can be used to create feed groups for any entity in you application. Since the default feed group of type flat created for you is called 'user' this can be confusing, but you are free to create a feed group with type 'flat' for Post/Group/or any other entity in your program that can have its own activity feed.
Aggregated Feeds
To achieve the behavior you have described above you will need to use the aggregated feed type. Create a feed group of type 'aggregated' as described above. Every time somebody supplies an answer to the question you create an activity with verb "answer" on the feed for that post. The default aggregation rule aggregates by time and verb id it looks like you are only interested in aggregation based on verb id. When you retrieve activities from the aggregated feed you can render it in the format that you have described above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With