From 0cae6c07bb64b86bb1ac7188c11ddf182021aa5b Mon Sep 17 00:00:00 2001 From: Holger Date: Fri, 20 Aug 2021 14:39:37 +0800 Subject: Fix #16603 (#16605) Fix issue #16603 undefined method `serialize_payload' for Unsuspend Account Service error. It seems that this service forgot to `include Payloadable` so that `serialize_payload` could not be found in this service. --- app/services/unsuspend_account_service.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/services/unsuspend_account_service.rb') diff --git a/app/services/unsuspend_account_service.rb b/app/services/unsuspend_account_service.rb index 949c670aa..b383f126a 100644 --- a/app/services/unsuspend_account_service.rb +++ b/app/services/unsuspend_account_service.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class UnsuspendAccountService < BaseService + include Payloadable def call(account) @account = account -- cgit From 9ac7e6fef770c0627c14d704fdf525c9515d6a6c Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 20 Aug 2021 08:40:33 +0200 Subject: Fix remotely-suspended accounts' toots being merged back into timelines (#16628) * Fix remotely-suspended accounts' toots being merged back into timelines * Mark remotely-deleted accounts as remotely suspended --- app/services/resolve_account_service.rb | 1 + app/services/unsuspend_account_service.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'app/services/unsuspend_account_service.rb') 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 b383f126a..39d8a6ba7 100644 --- a/app/services/unsuspend_account_service.rb +++ b/app/services/unsuspend_account_service.rb @@ -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! -- cgit