Skip to content

Commit aeff803

Browse files
committed
builder.Neq not builder.NEq
Signed-off-by: Andrew Thornton <art27@cantab.net>
1 parent 93cec4c commit aeff803

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

models/user/user.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,17 +1232,16 @@ func isUserVisibleToViewerCond(viewer *User) builder.Cond {
12321232
if viewer != nil && viewer.IsAdmin {
12331233
return cond
12341234
}
1235-
cond = builder.Eq{
1236-
"`user`.Visibility": structs.VisibleTypePublic,
1237-
}
12381235

12391236
if viewer == nil || viewer.IsRestricted {
1240-
return cond
1237+
return builder.Eq{
1238+
"`user`.Visibility": structs.VisibleTypePublic,
1239+
}
12411240
}
12421241

1243-
cond = builder.Not{builder.Eq{
1242+
cond = builder.Neq{
12441243
"`user`.Visibility": structs.VisibleTypePrivate,
1245-
}}.Or(
1244+
}.Or(
12461245
builder.In("`user`.id",
12471246
builder.
12481247
Select("`follow`.user_id").

0 commit comments

Comments
 (0)