Search code examples
getstream-io

What is the best way to add a user feed to his own timeline?


I would like to build an Instagram-like social app, where on the user timeline, you also have his own activities displayed. My first thought was to follow his own user feed but from what I read in this blog post: https://getstream.io/blog/best-practices-for-instagram-style-feeds/

We recommend blocking a user's timeline feed from following their own user feed

Can someone explain why it would be a bad practice ? How could I implement my use case if that is the case ? Thanks !


Solution

  • Looking at this myself. I think the logic they describe is incorrect. The full statement in context make a little more sense in terms of what I think they mean.

    We recommend blocking a user's timeline feed from following their own user feed, and also blocking users from seeing/following another user's timeline feed.

    The first part of the sentence I believe is backwards. What I think it should says is that the "user" feed should be blocked from following the "timeline" feed. The user feed should just contain actions that the user performed, so it shouldn't contain data from the timeline feed. But if you want the user's activities to appear in the timeline feed than it seems to me that you should definetly make the user's timeline feed follow thier user feed, and prevent the user's timeline feed from unfollowing their own user feed.

    The second part that says you should block users from following another user's timeline feed. I believe this is correct because the timeline feed is a series of peronalised items for an individual user. It doesn't make sense to follow another user's timeline feed.

    This is how I have implemented my logic and it seems to be working so far, but if I come across any issues with it I'll come back here and update this answer.