aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/user/user.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/user/user.go b/models/user/user.go
index d828f3d65d..204c8f41b6 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.