]> 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)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 8 Jul 2019 16:17:22 +0000 (18:17 +0200)
app/models/status.rb

index 6f1e35e4aabb4e2ae96d504840bc7ffea5929b05..23682c84b0feabf07c7a4d32408dd83aea794b84 100644 (file)
@@ -75,7 +75,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') }