Updated status.rb replies scopes to check in_reply_to_id

• Updated:
- status.rb replies scopes to check in_reply_to_id instead of reply
This commit is contained in:
mgabdev 2020-05-19 13:35:17 -04:00
parent 483f8fb888
commit 9f9b410207
1 changed files with 2 additions and 2 deletions

View File

@ -89,8 +89,8 @@ class Status < ApplicationRecord
scope :remote, -> { where(local: false).or(where.not(uri: nil)) }
scope :local, -> { where(local: true).or(where(uri: nil)) }
scope :only_replies, -> { where('statuses.reply = TRUE') }
scope :without_replies, -> { where('statuses.reply = FALSE') }
scope :only_replies, -> { where('statuses.in_reply_to_id IS NOT NULL') }
scope :without_replies, -> { where('statuses.in_reply_to_id IS NULL') }
scope :without_reblogs, -> { where('statuses.reblog_of_id IS NULL') }
scope :with_public_visibility, -> { where(visibility: :public) }
scope :tagged_with, ->(tag) { joins(:statuses_tags).where(statuses_tags: { tag_id: tag }) }