feed := client.Feeds().Feed("user", "alice")
resp, err := feed.ChangeFeedVisibility(context.Background(), &getstream.ChangeFeedVisibilityRequest{
Visibility: "followers",
})
if err != nil {
log.Fatal(err)
}
log.Printf("updated visibility: %+v", resp.Data)
// Process pending follow requests while loosening from followers
_, err = feed.ChangeFeedVisibility(context.Background(), &getstream.ChangeFeedVisibilityRequest{
Visibility: "visible",
PendingFollowsAction: getstream.PtrTo("reject"),
})
if err != nil {
log.Fatal(err)
}Changing Feed Visibility
Changing Feed Visibility
Visibility changes are asynchronous. The API returns optimistically, then reconciles follow relationships in the background.
How transitions behave
Tightening visibility (for example visible -> members or private):
- Users who no longer qualify are unfollowed automatically.
- Tightening to
memberskeeps member follows and owner follow. - Tightening to
privatekeeps only owner follow.
Loosening visibility from followers (for example followers -> visible):
- Pending follow requests are processed by
pending_follows_action:auto_approve(default)reject
pending_follows_actionis only used when transitioning away fromfollowers.