This commit is contained in:
Matt Jankowski 2024-05-03 15:08:52 +00:00 committed by GitHub
commit a9ae147d96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -122,6 +122,7 @@ class Account < ApplicationRecord
scope :silenced, -> { where.not(silenced_at: nil) }
scope :suspended, -> { where.not(suspended_at: nil) }
scope :sensitized, -> { where.not(sensitized_at: nil) }
scope :migrated, -> { where.not(moved_to_account_id: nil) }
scope :without_suspended, -> { where(suspended_at: nil) }
scope :without_silenced, -> { where(silenced_at: nil) }
scope :without_instance_actor, -> { where.not(id: INSTANCE_ACTOR_ID) }

View file

@ -92,7 +92,7 @@ class RelationshipFilter
def status_scope(value)
case value
when 'moved'
Account.where.not(moved_to_account_id: nil)
Account.migrated
when 'primary'
Account.where(moved_to_account_id: nil)
else