问题
I am trying to mimic setup of sites like Twitter and others where your own posts are shown in your timeline alongside those of people you follow. I was thinking of just adding a rule when a new user signs up to fire off a request to follow themselves basically. The only issue I could see is follower counts would have to be subtracted by one, but is that the best practice on how to handle this scenario or is there a better way?
回答1:
That's a typical thing you'd have to do when you would not be using GetStream.io. But in the case of GetStream.io, you really don't have to. A user's own activities should be showing up in their own feed. That's the default. If you want to disable it and don't want a user's own activities to show up in their own feed, there's a secret (well, not so secret, but you have to ask for it) option to disable that: https://getstream.io/docs/#discard-rules
In case it's not working for you and you don't know why, contact the private support channels to figure out if your feed setup is correct for your use case.
Cheers
来源:https://stackoverflow.com/questions/48980708/follow-yourself-in-a-stream-timeline-getstream-io