about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-01-03 00:38:02 +0100
committerGitHub <noreply@github.com>2018-01-03 00:38:02 +0100
commitd60fd87e0191ad05d8dd7f2e8d7d265db6f168d3 (patch)
tree31efda00b160bec56dc50c41e7c9ea6d9fd9e44e
parent94230fe565cf20ba10f6d0cd6f090a4520c174ca (diff)
Don't leave behind husk of remotely-deleted profile (#6159)
There's no reason for an Account record to persist after Delete->Actor is received. SuspendAccountService is necessary to make sure deleted toots get sent over streaming API properly and home feeds get cleaned up. By removing Account record, we can ensure that if in the future the account is restored remotely (or username reused), it can start with a clean slate.
-rw-r--r--app/lib/activitypub/activity/delete.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/lib/activitypub/activity/delete.rb b/app/lib/activitypub/activity/delete.rb
index d0fb49342..5fa60a81c 100644
--- a/app/lib/activitypub/activity/delete.rb
+++ b/app/lib/activitypub/activity/delete.rb
@@ -13,6 +13,7 @@ class ActivityPub::Activity::Delete < ActivityPub::Activity
 
   def delete_person
     SuspendAccountService.new.call(@account)
+    @account.destroy!
   end
 
   def delete_note