about summary refs log tree commit diff
path: root/app/models/admin
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/admin')
-rw-r--r--app/models/admin/account_action.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/admin/account_action.rb b/app/models/admin/account_action.rb
index 1ed464423..2195dc6a9 100644
--- a/app/models/admin/account_action.rb
+++ b/app/models/admin/account_action.rb
@@ -12,6 +12,7 @@ class Admin::AccountAction
     force_unlisted
     silence
     suspend
+    mark_unknown
   ).freeze
 
   attr_accessor :target_account,
@@ -66,6 +67,8 @@ class Admin::AccountAction
       handle_silence!
     when 'suspend'
       handle_suspend!
+    when 'mark_unknown'
+      handle_mark_unknown!
     end
   end
 
@@ -128,6 +131,12 @@ class Admin::AccountAction
     queue_suspension_worker!
   end
 
+  def handle_mark_unknown!
+    authorize(target_account, :mark_unknown?)
+    log_action(:mark_unknown, target_account.user)
+    target_account.mark_unknown!
+  end
+
   def text_for_warning
     [warning_preset&.text, text].compact.join("\n\n")
   end