about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-05-19 21:19:41 +0200
committerGitHub <noreply@github.com>2017-05-19 21:19:41 +0200
commitf8ee136c29aa7185fe05450090229d428986e529 (patch)
tree43428818422b1b2b5bfaa6d2081d4ebdb3baaab4 /app/models/status.rb
parentf1ab70649b00e717a00ac295d42ff99160aa713b (diff)
Fix federated timeline excluding local toots when any domain blocks are set (#3151)
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 80f33a7c7..88bfd1748 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -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