]> cat aescling's git repositories - mastodon.git/commitdiff
Status#not_local_only scope should match nils too
authorErin <sylphofelectricity@gmail.com>
Mon, 11 Dec 2017 01:41:33 +0000 (19:41 -0600)
committerErin <sylphofelectricity@gmail.com>
Mon, 11 Dec 2017 02:35:42 +0000 (20:35 -0600)
app/models/status.rb

index 6f7a8c82da75b617051f005a1695e498ec8f703e..920c255d7486654007ac40fc49c6597488750cac 100644 (file)
@@ -75,7 +75,7 @@ class Status < ApplicationRecord
   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_local_only, -> { where(local_only: false) }
+  scope :not_local_only, -> { where(local_only: [false, nil]) }
 
   cache_associated :account, :application, :media_attachments, :tags, :stream_entry, mentions: :account, reblog: [:account, :application, :stream_entry, :tags, :media_attachments, mentions: :account], thread: :account