From b69e14dc76cd3d4623253f3b4dc424c48f59c135 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Sat, 1 Aug 2020 19:59:26 -0500 Subject: [Privacy] Send delete requests to known federation --- app/services/remove_status_service.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app') diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb index ec0cb9cf5..6fd860628 100644 --- a/app/services/remove_status_service.rb +++ b/app/services/remove_status_service.rb @@ -48,6 +48,7 @@ class RemoveStatusService < BaseService remove_from_remote_followers remove_from_remote_affected + remove_from_remote_shared end private @@ -111,6 +112,12 @@ class RemoveStatusService < BaseService end end + def remove_from_remote_shared + ActivityPub::DeliveryWorker.push_bulk(Account.remote.activitypub.where.not(shared_inbox_url: '').distinct.select(:shared_inbox_url).pluck(:shared_inbox_url)) do |inbox_url| + [signed_activity_json, @account.id, inbox_url] + end + end + def signed_activity_json @signed_activity_json ||= Oj.dump(serialize_payload(@status, @status.reblog? ? ActivityPub::UndoAnnounceSerializer : ActivityPub::DeleteSerializer, signer: @account)) end -- cgit