summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-09-15 14:37:58 +0200
committerGitHub <noreply@github.com>2020-09-15 14:37:58 +0200
commited099d8bdc5b3d9e7df7ce5358441887e6bb7e48 (patch)
treee55ddfa97c0c9932e35c8ffd7cb59434084bd478 /lib
parentbbcbf12215a5ec69362a769c1bae9c630eda0ed4 (diff)
Change account suspensions to be reversible by default (#14726)
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/accounts_cli.rb4
-rw-r--r--lib/mastodon/domains_cli.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/accounts_cli.rb
index 8c91c301358..8f9279a3c05 100644
--- a/lib/mastodon/accounts_cli.rb
+++ b/lib/mastodon/accounts_cli.rb
@@ -87,7 +87,7 @@ module Mastodon
say('Use --force to reattach it anyway and delete the other user')
return
elsif account.user.present?
- account.user.destroy!
+ DeleteAccountService.new.call(account, reserve_email: false)
end
end
@@ -192,7 +192,7 @@ module Mastodon
end
say("Deleting user with #{account.statuses_count} statuses, this might take a while...")
- SuspendAccountService.new.call(account, reserve_email: false)
+ DeleteAccountService.new.call(account, reserve_email: false)
say('OK', :green)
end
diff --git a/lib/mastodon/domains_cli.rb b/lib/mastodon/domains_cli.rb
index 558737c273e..5433ddd9d7e 100644
--- a/lib/mastodon/domains_cli.rb
+++ b/lib/mastodon/domains_cli.rb
@@ -42,7 +42,7 @@ module Mastodon
end
processed, = parallelize_with_progress(scope) do |account|
- SuspendAccountService.new.call(account, reserve_username: false, skip_side_effects: true) unless options[:dry_run]
+ DeleteAccountService.new.call(account, reserve_username: false, skip_side_effects: true) unless options[:dry_run]
end
DomainBlock.where(domain: domains).destroy_all unless options[:dry_run]