about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-09-11 16:32:44 +0200
committerGitHub <noreply@github.com>2019-09-11 16:32:44 +0200
commitc5d37f18cb3f4d6212fb8f3e1c4e1e027f677ec5 (patch)
tree190b0c85e6e8f3880d9d291781d9a73185e0252c /app/lib
parent4fe127664b0ae22a528b4a4467ab2de92e3da3ef (diff)
Change deletes to preserve soft-deleted statuses in unresolved reports (#11805)
Change all account actions except "none" to resolve all unresolved reports

Refactor `SuspendAccountService` to be more readable
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/activity/delete.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity/delete.rb b/app/lib/activitypub/activity/delete.rb
index 345060462..dc9ff580c 100644
--- a/app/lib/activitypub/activity/delete.rb
+++ b/app/lib/activitypub/activity/delete.rb
@@ -13,8 +13,7 @@ class ActivityPub::Activity::Delete < ActivityPub::Activity
 
   def delete_person
     lock_or_return("delete_in_progress:#{@account.id}") do
-      SuspendAccountService.new.call(@account)
-      @account.destroy!
+      SuspendAccountService.new.call(@account, reserve_username: false)
     end
   end