We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3039ef9 commit c1517bdCopy full SHA for c1517bd
models/user/search.go
@@ -157,6 +157,10 @@ func BuildCanSeeUserCondition(actor *User) builder.Cond {
157
if !actor.IsRestricted {
158
// Not-Restricted users can see public and limited users/organizations
159
cond = cond.Or(builder.In("`user`.visibility", structs.VisibleTypePublic, structs.VisibleTypeLimited))
160
+ // or private users who do follow them
161
+ cond = cond.Or(builder.Eq{
162
+ "`user`.visibility": structs.VisibleTypePrivate,
163
+ "`user`.id": builder.Select("follow.user_id").From("follow").Where(builder.Eq{"follow.follow_id": actor.ID})})
164
}
165
// Don't forget about self
166
return cond.Or(builder.Eq{"`user`.id": actor.ID})
0 commit comments