about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-12-03 01:32:08 +0100
committerGitHub <noreply@github.com>2018-12-03 01:32:08 +0100
commit6ddf0432e71aea7c62f1ee7946da5538d2526a13 (patch)
treefa8057bdaee7c582d5aa3cb82071a9805412b082 /lib
parent2df5ef18ae3449825fdef6c83d5b3a7b19fd7ebb (diff)
Improve account suspension speed and completeness (#9290)
- Some associations were missing from the clean-up
- Some attributes were not reset on suspension
- Skip federation and streaming deletes when purging a dead domain
- Move account association definitions to concern
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/domains_cli.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/domains_cli.rb
index a7a5caa11..16e298584 100644
--- a/lib/mastodon/domains_cli.rb
+++ b/lib/mastodon/domains_cli.rb
@@ -22,11 +22,7 @@ module Mastodon
       dry_run = options[:dry_run] ? ' (DRY RUN)' : ''
 
       Account.where(domain: domain).find_each do |account|
-        unless options[:dry_run]
-          SuspendAccountService.new.call(account)
-          account.destroy
-        end
-
+        SuspendAccountService.new.call(account, destroy: true) unless options[:dry_run]
         removed += 1
         say('.', :green, false)
       end