From 6d07ba50f31f82633019b62dc83ec7099e3926b3 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 19 Jul 2019 15:43:59 -0500 Subject: keep `locked` badge for approves-followers + add `frozen` badge for admin-locked accts, also federate `frozen` state --- app/models/account.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/models') 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 -- cgit