diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/status.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index ade8b4c85..e81331e93 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -502,15 +502,14 @@ class Status < ApplicationRecord else # followers can see followers-only stuff, but also things they are mentioned in. # non-followers can see everything that isn't private/direct, but can see stuff they are mentioned in. - scope = left_outer_joins(:reblog).published + visibility.push(:private) if account.following?(target_account) && user_signed_in + scope = left_outer_joins(:reblog) scope = scope.where(visibility: visibility) .or(scope.where(id: account.mentions.select(:status_id))) .merge(scope.where(reblog_of_id: nil).or(scope.where.not(reblogs_statuses: { account_id: account.excluded_from_timeline_account_ids }))) - scope = scope.or(scope.where(visibility: :private).without_replies) if account.following?(target_account) - - apply_timeline_filters(scope, account, false) + apply_timeline_filters(scope.published, account, false) end end |