about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index b1cf34e9a..aa904588b 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -58,6 +58,10 @@ class Account < ApplicationRecord
   scope :without_followers, -> { where('(select count(f.id) from follows as f where f.target_account_id = accounts.id) = 0') }
   scope :with_followers, -> { where('(select count(f.id) from follows as f where f.target_account_id = accounts.id) > 0') }
   scope :expiring, ->(time) { where(subscription_expires_at: nil).or(where('subscription_expires_at < ?', time)).remote.with_followers }
+  scope :silenced, -> { where(silenced: true) }
+  scope :suspended, -> { where(suspended: true) }
+  scope :recent, -> { reorder('id desc') }
+  scope :alphabetic, -> { order('domain ASC, username ASC') }
 
   def follow!(other_account)
     active_relationships.where(target_account: other_account).first_or_create!(target_account: other_account)