about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-19 15:43:59 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-19 17:03:15 -0500
commit6d07ba50f31f82633019b62dc83ec7099e3926b3 (patch)
tree7d3d329b88c60a04d3aee35e71d932203fc73ba4 /app/models
parent3fda862ea004c1c417a442b2a8f38a67d0535979 (diff)
keep `locked` badge for approves-followers + add `frozen` badge for admin-locked accts, also federate `frozen` state
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 778b3fcbb..4b39cf022 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -51,6 +51,7 @@
 #  supports_chat           :boolean          default(FALSE), not null
 #  gently                  :boolean          default(FALSE), not null
 #  kobold                  :boolean          default(FALSE), not null
+#  froze                   :boolean
 #
 
 class Account < ApplicationRecord
@@ -172,6 +173,10 @@ class Account < ApplicationRecord
     moved_to_account_id.present?
   end
 
+  def frozen?
+    local? ? (self&.user.nil? ? true : user.disabled?) : frozen
+  end
+
   def bot?
     %w(Application Service).include? actor_type
   end