about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-12-19 02:17:02 +0100
committerGitHub <noreply@github.com>2020-12-19 02:17:02 +0100
commit79c57810b7fea1962c9746d74c90235ad4e3e899 (patch)
tree6ec332dd20fa4ce8de954d8e260cce3f2dc67aee /app/models/account.rb
parent92cfcf168cae094ece281b3cb6d0f5b1539a8c25 (diff)
parent5c966bef8b6aa116cfa2102e83e42d0fe421f3fc (diff)
Merge pull request #1477 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index b0e254233..840ec4c62 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -104,6 +104,7 @@ class Account < ApplicationRecord
   scope :sensitized, -> { where.not(sensitized_at: nil) }
   scope :without_suspended, -> { where(suspended_at: nil) }
   scope :without_silenced, -> { where(silenced_at: nil) }
+  scope :without_instance_actor, -> { where.not(id: -99) }
   scope :recent, -> { reorder(id: :desc) }
   scope :bots, -> { where(actor_type: %w(Application Service)) }
   scope :groups, -> { where(actor_type: 'Group') }
@@ -226,7 +227,7 @@ class Account < ApplicationRecord
   end
 
   def suspended?
-    suspended_at.present?
+    suspended_at.present? && !instance_actor?
   end
 
   def suspended_permanently?