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 93cec4c commit aeff803Copy full SHA for aeff803
models/user/user.go
@@ -1232,17 +1232,16 @@ func isUserVisibleToViewerCond(viewer *User) builder.Cond {
1232
if viewer != nil && viewer.IsAdmin {
1233
return cond
1234
}
1235
- cond = builder.Eq{
1236
- "`user`.Visibility": structs.VisibleTypePublic,
1237
- }
1238
1239
if viewer == nil || viewer.IsRestricted {
1240
- return cond
+ return builder.Eq{
+ "`user`.Visibility": structs.VisibleTypePublic,
+ }
1241
1242
1243
- cond = builder.Not{builder.Eq{
+ cond = builder.Neq{
1244
"`user`.Visibility": structs.VisibleTypePrivate,
1245
- }}.Or(
+ }.Or(
1246
builder.In("`user`.id",
1247
builder.
1248
Select("`follow`.user_id").
0 commit comments