Fixed issue with locked/private users displaying in Pro feed and Verified wtf

• Fixed:
- issue with locked/private users displaying in Pro feed and Verified wtf
This commit is contained in:
mgabdev 2020-08-19 11:37:31 -05:00
parent 234b65697a
commit addf9d9dd1
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ class Status < ApplicationRecord
scope :tagged_with, ->(tag) { joins(:statuses_tags).where(statuses_tags: { tag_id: tag }) } scope :tagged_with, ->(tag) { joins(:statuses_tags).where(statuses_tags: { tag_id: tag }) }
scope :excluding_silenced_accounts, -> { left_outer_joins(:account).where(accounts: { silenced_at: nil }) } scope :excluding_silenced_accounts, -> { left_outer_joins(:account).where(accounts: { silenced_at: nil }) }
scope :including_silenced_accounts, -> { left_outer_joins(:account).where.not(accounts: { silenced_at: nil }) } scope :including_silenced_accounts, -> { left_outer_joins(:account).where.not(accounts: { silenced_at: nil }) }
scope :popular_accounts, -> { left_outer_joins(:account).where('accounts.is_verified=true OR accounts.is_pro=true') } scope :popular_accounts, -> { left_outer_joins(:account).where('accounts.is_verified=true OR accounts.is_pro=true AND accounts.locked=false') }
scope :not_excluded_by_account, ->(account) { where.not(account_id: account.excluded_from_timeline_account_ids) } scope :not_excluded_by_account, ->(account) { where.not(account_id: account.excluded_from_timeline_account_ids) }
scope :not_domain_blocked_by_account, ->(account) { account.excluded_from_timeline_domains.blank? ? left_outer_joins(:account) : left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) } scope :not_domain_blocked_by_account, ->(account) { account.excluded_from_timeline_domains.blank? ? left_outer_joins(:account) : left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) }
scope :tagged_with_all, ->(tags) { scope :tagged_with_all, ->(tags) {