]> cat aescling's git repositories - mastodon.git/commitdiff
Fix remotely-suspended accounts' toots being merged back into timelines (#16628)
authorClaire <claire.github-309c@sitedethib.com>
Fri, 20 Aug 2021 06:40:33 +0000 (08:40 +0200)
committerGitHub <noreply@github.com>
Fri, 20 Aug 2021 06:40:33 +0000 (07:40 +0100)
* Fix remotely-suspended accounts' toots being merged back into timelines

* Mark remotely-deleted accounts as remotely suspended

app/services/resolve_account_service.rb
app/services/unsuspend_account_service.rb

index 5400612bfd194f19f0cba9b97b11deec2675f84b..b266c019e29bdd8d566cabafdc3d7440d83f4e16 100644 (file)
@@ -142,6 +142,7 @@ class ResolveAccountService < BaseService
   end
 
   def queue_deletion!
+    @account.suspend!(origin: :remote)
     AccountDeletionWorker.perform_async(@account.id, reserve_username: false, skip_activitypub: true)
   end
 
index b383f126a7310de8e4297dd6ae6d1d4d67cabe53..39d8a6ba7f37bd36fadcfe06c60b0a2df7515cad 100644 (file)
@@ -8,7 +8,7 @@ class UnsuspendAccountService < BaseService
     unsuspend!
     refresh_remote_account!
 
-    return if @account.nil?
+    return if @account.nil? || @account.suspended?
 
     merge_into_home_timelines!
     merge_into_list_timelines!