about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 9daf063a5..c84a7406d 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -196,6 +196,13 @@ class Account < ApplicationRecord
     ResolveAccountService.new.call(acct)
   end
 
+  def suspend!
+    transaction do
+      user&.disable! if local?
+      update!(suspended: true)
+    end
+  end
+
   def unsuspend!
     transaction do
       user&.enable! if local?