diff --git a/models/user/user.go b/models/user/user.go index d828f3d65dcc1..204c8f41b63c9 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -1230,6 +1230,8 @@ func isUserVisibleToViewerCond(viewer *User) builder.Cond { return builder.Neq{ "`user`.visibility": structs.VisibleTypePrivate, }.Or( + // viewer self + builder.Eq{"`user`.id": viewer.ID}, // viewer's following builder.In("`user`.id", builder.