diff options
Diffstat (limited to 'app/models/tweet.rb')
-rw-r--r-- | app/models/tweet.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/tweet.rb b/app/models/tweet.rb index d42576f..ce3e922 100644 --- a/app/models/tweet.rb +++ b/app/models/tweet.rb @@ -15,7 +15,7 @@ class Tweet < ActiveRecord::Base scope :recent, ->(period = 3.days) { where("tweets.id > ?", snowflake_min(Time.zone.now - period)) } scope :reacted, ->(count = nil) { where("reactions_count >= ?", (count || 1).to_i) } scope :not_protected, -> { joins(:user).references(:user).where(users: { protected: false }) } - scope :registered, -> { joins(user: :account).references(:account).where(accounts: { status: Account::ACTIVE }) } + scope :registered, -> { joins(user: :account).references(:account).merge(Account.active) } scope :max_id, -> id { where("tweets.id <= ?", id.to_i) if id } scope :since_id, -> id { where("tweets.id > ?", id.to_i) if id } |