Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion models/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,9 @@ func IsUserVisibleToViewer(ctx context.Context, u, viewer *User) bool {
if viewer == nil || viewer.IsRestricted {
return false
}
if viewer.ID == u.ID {
return true
}

// If they follow - they see each over
follower := IsFollowing(u.ID, viewer.ID)
Expand All @@ -1306,7 +1309,7 @@ func IsUserVisibleToViewer(ctx context.Context, u, viewer *User) bool {
return false
}

if count < 0 {
if count == 0 {
// No common organization
return false
}
Expand Down