about summary refs log tree commit diff
path: root/app/services/suspend_account_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-06 18:32:36 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-06 18:32:36 +0100
commit2ef9f36cf2b956a6e9057a4ef784f7770a97419e (patch)
treeca5dc73b62f3c7a8996cff5f916d05063731069e /app/services/suspend_account_service.rb
parentf978b06dd188fef4c2ece5e787818579b663ddf8 (diff)
Improve suspend account service
Diffstat (limited to 'app/services/suspend_account_service.rb')
-rw-r--r--app/services/suspend_account_service.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/suspend_account_service.rb b/app/services/suspend_account_service.rb
index 729bf42fe..04a086613 100644
--- a/app/services/suspend_account_service.rb
+++ b/app/services/suspend_account_service.rb
@@ -12,8 +12,11 @@ class SuspendAccountService < BaseService
   private
 
   def purge_content
+    @account.statuses.find_each do |status|
+      RemoveStatusService.new.call(status)
+    end
+
     @account.media_attachments.destroy_all
-    @account.statuses.destroy_all
     @account.stream_entries.destroy_all
     @account.mentions.destroy_all
     @account.notifications.destroy_all