]> cat aescling's git repositories - mastodon.git/commitdiff
fix purge_removed_accounts task should suspend account before delete it (#6521)
authortakayamaki <fsgiko@gmail.com>
Wed, 21 Feb 2018 15:30:46 +0000 (00:30 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 21 Feb 2018 15:30:46 +0000 (16:30 +0100)
lib/tasks/mastodon.rake

index e144621e577c2a796ada73498f62a1d596fa4e70..d2e4f38a9a5759da70d74c762b7762586a62d666 100644 (file)
@@ -752,6 +752,7 @@ namespace :mastodon do
 
         if [404, 410].include?(res.code)
           if options[:force]
+            SuspendAccountService.new.call(account)
             account.destroy
           else
             progress_bar.pause
@@ -764,6 +765,7 @@ namespace :mastodon do
             if confirm.casecmp('n').zero?
               next
             else
+              SuspendAccountService.new.call(account)
               account.destroy
             end
           end