about summary refs log tree commit diff
path: root/app/lib/activitypub/activity/delete.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-09-11 16:32:44 +0200
committermultiple creatures <dev@multiple-creature.party>2020-02-27 13:55:39 -0600
commit3681f7dcce8f82d2a4377a051952159cd03919c0 (patch)
tree1e11fbf90b822450b0e736408cb17442babc54a6 /app/lib/activitypub/activity/delete.rb
parent422b59808b4818171e057e1a459de153816bf505 (diff)
port tootsuite#11805 to monserfork: Change deletes to preserve soft-deleted statuses in unresolved reports
Change all account actions except "none" to resolve all unresolved reports

Refactor `SuspendAccountService` to be more readable
Diffstat (limited to 'app/lib/activitypub/activity/delete.rb')
-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 8b9c21958..a4732f1b8 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