]> cat aescling's git repositories - mastodon.git/commitdiff
Fix Status.remote scope matching *all* statuses (#11265)
authorThibG <thib@sitedethib.com>
Mon, 8 Jul 2019 16:17:22 +0000 (18:17 +0200)
committerThibaut Girka <thib@sitedethib.com>
Sun, 14 Jul 2019 22:48:50 +0000 (00:48 +0200)
app/models/status.rb

index 5ddce72de238f03d69e59983ad7d2f0b053df608..5adccb7226f0c0c676496d468a9a56ba1ae7720f 100644 (file)
@@ -82,7 +82,7 @@ class Status < ApplicationRecord
   default_scope { recent }
 
   scope :recent, -> { reorder(id: :desc) }
-  scope :remote, -> { where(local: false).or(where.not(uri: nil)) }
+  scope :remote, -> { where(local: false).where.not(uri: nil) }
   scope :local,  -> { where(local: true).or(where(uri: nil)) }
 
   scope :without_replies, -> { where('statuses.reply = FALSE OR statuses.in_reply_to_account_id = statuses.account_id') }