about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-01 19:59:26 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:17 -0500
commitb69e14dc76cd3d4623253f3b4dc424c48f59c135 (patch)
tree97cce5ebfbfcc0b64737968bca7b85a9bb801a3f /app/services
parent8b329d6e13c177336e42ae2377a9484505dd3701 (diff)
[Privacy] Send delete requests to known federation
Diffstat (limited to 'app/services')
-rw-r--r--app/services/remove_status_service.rb7
1 files changed, 7 insertions, 0 deletions
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