about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-08-20 13:01:50 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-08-20 13:01:50 +0200
commit4e2a8c9b386635efdda71de94a78ccbdffc4e152 (patch)
treed136d66680e1223d28cd5d40312a99a86976f9c8 /app/services
parent4a364de500029676b9828ec596ed6c2a09cfb65c (diff)
parenta2afcac7d9d55860f62f2f27475cd5a059090505 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/services')
-rw-r--r--app/services/resolve_account_service.rb1
-rw-r--r--app/services/unsuspend_account_service.rb3
2 files changed, 3 insertions, 1 deletions
diff --git a/app/services/resolve_account_service.rb b/app/services/resolve_account_service.rb
index 5400612bf..b266c019e 100644
--- a/app/services/resolve_account_service.rb
+++ b/app/services/resolve_account_service.rb
@@ -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
 
diff --git a/app/services/unsuspend_account_service.rb b/app/services/unsuspend_account_service.rb
index 949c670aa..39d8a6ba7 100644
--- a/app/services/unsuspend_account_service.rb
+++ b/app/services/unsuspend_account_service.rb
@@ -1,13 +1,14 @@
 # frozen_string_literal: true
 
 class UnsuspendAccountService < BaseService
+  include Payloadable
   def call(account)
     @account = account
 
     unsuspend!
     refresh_remote_account!
 
-    return if @account.nil?
+    return if @account.nil? || @account.suspended?
 
     merge_into_home_timelines!
     merge_into_list_timelines!