about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-09-17 10:49:54 -0500
committerFire Demon <firedemon@creature.cafe>2020-09-17 10:49:54 -0500
commit1f565e335bf0fb9de1581958fe6e3df45aee2d8b (patch)
tree7932b84de85341513a5eddce4da31cf190f54a30
parent346aa6566206c6a86371883e736984d1a14012dd (diff)
[Models] Consider anything that is not a top-level post a reply
-rw-r--r--app/models/status.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 3d524dec5..1a98f12c3 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -108,7 +108,7 @@ class Status < ApplicationRecord
   scope :local,  -> { where(local: true).or(where(uri: nil)) }
 
   scope :with_accounts, ->(ids) { where(id: ids).includes(:account) }
-  scope :without_replies, -> { where('statuses.reply = FALSE OR statuses.in_reply_to_account_id = statuses.account_id') }
+  scope :without_replies, -> { where(reply: false) }
   scope :without_reblogs, -> { where('statuses.reblog_of_id IS NULL') }
   scope :with_public_visibility, -> { where(visibility: :public, published: true) }
   scope :distributable, -> { where(visibility: [:public, :unlisted], published: true) }
@@ -139,7 +139,7 @@ class Status < ApplicationRecord
   scope :locally_reblogged, -> { where(id: Status.unscoped.local.reblogs.select(:reblog_of_id)) }
   scope :conversations_by, ->(account) { joins(:conversation).where(conversations: { account: account }) }
   scope :mentioning_account, ->(account) { joins(:mentions).where(mentions: { account: account }) }
-  scope :replies, -> { where(reply: true).where('statuses.in_reply_to_account_id != statuses.account_id') }
+  scope :replies, -> { where(reply: true) }
   scope :expired, -> { published.where('statuses.expires_at IS NOT NULL AND statuses.expires_at < ?', Time.now.utc) }
   scope :ready_to_publish, -> { unpublished.where('statuses.publish_at IS NOT NULL AND statuses.publish_at < ?', Time.now.utc) }