Skip to content
Snippets Groups Projects
Commit f8ee136c authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix federated timeline excluding local toots when any domain blocks are set (#3151)

parent f1ab7064
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@ class Status < ApplicationRecord
scope :excluding_silenced_accounts, -> { left_outer_joins(:account).where(accounts: { silenced: false }) }
scope :including_silenced_accounts, -> { left_outer_joins(:account).where(accounts: { silenced: true }) }
scope :not_excluded_by_account, ->(account) { where.not(account_id: account.excluded_from_timeline_account_ids) }
scope :not_domain_blocked_by_account, ->(account) { left_outer_joins(:account).where.not(accounts: { domain: account.excluded_from_timeline_domains }) }
scope :not_domain_blocked_by_account, ->(account) { left_outer_joins(:account).where('accounts.domain IS NULL OR accounts.domain NOT IN (?)', account.excluded_from_timeline_domains) }
cache_associated :account, :application, :media_attachments, :tags, :stream_entry, mentions: :account, reblog: [:account, :application, :stream_entry, :tags, :media_attachments, mentions: :account], thread: :account
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment