diff options
Diffstat (limited to 'app/services/after_block_domain_from_account_service.rb')
-rw-r--r-- | app/services/after_block_domain_from_account_service.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/services/after_block_domain_from_account_service.rb b/app/services/after_block_domain_from_account_service.rb index 180f13403..a87c2e792 100644 --- a/app/services/after_block_domain_from_account_service.rb +++ b/app/services/after_block_domain_from_account_service.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class AfterBlockDomainFromAccountService < BaseService + include Payloadable + # This service does not create an AccountDomainBlock record, # it's meant to be called after such a record has been created # synchronously, to "clean up" @@ -31,12 +33,6 @@ class AfterBlockDomainFromAccountService < BaseService return unless follow.account.activitypub? - json = ActiveModelSerializers::SerializableResource.new( - follow, - serializer: ActivityPub::RejectFollowSerializer, - adapter: ActivityPub::Adapter - ).to_json - - ActivityPub::DeliveryWorker.perform_async(json, @account.id, follow.account.inbox_url) + ActivityPub::DeliveryWorker.perform_async(Oj.dump(serialize_payload(follow, ActivityPub::RejectFollowSerializer)), @account.id, follow.account.inbox_url) end end |