about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-06-13 23:05:19 -0700
committerReverite <github@reverite.sh>2019-06-13 23:05:19 -0700
commit7ce2a4e95331cc9ef9b782a5c4d8046d8a835a05 (patch)
treebc4e5e39ee96ae74cbf9c09570b2e545da6587e0 /app/lib
parent3614718bc91f90a6dc19dd80ecf3bc191283c24e (diff)
parentc0e5f32d13dfd696728dc1fa2ad9a93a27aa405f (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/activity/delete.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity/delete.rb b/app/lib/activitypub/activity/delete.rb
index 4236af071..0eb14b89c 100644
--- a/app/lib/activitypub/activity/delete.rb
+++ b/app/lib/activitypub/activity/delete.rb
@@ -45,7 +45,7 @@ class ActivityPub::Activity::Delete < ActivityPub::Activity
     rebloggers_ids = @status.reblogs.includes(:account).references(:account).merge(Account.local).pluck(:account_id)
     inboxes        = Account.where(id: ::Follow.where(target_account_id: rebloggers_ids).select(:account_id)).inboxes - [@account.preferred_inbox_url]
 
-    ActivityPub::DeliveryWorker.push_bulk(inboxes) do |inbox_url|
+    ActivityPub::LowPriorityDeliveryWorker.push_bulk(inboxes) do |inbox_url|
       [payload, rebloggers_ids.first, inbox_url]
     end
   end
@@ -61,7 +61,12 @@ class ActivityPub::Activity::Delete < ActivityPub::Activity
 
   def forward_for_reply
     return unless @json['signature'].present? && reply_to_local?
-    ActivityPub::RawDistributionWorker.perform_async(Oj.dump(@json), replied_to_status.account_id, [@account.preferred_inbox_url])
+
+    inboxes = replied_to_status.account.followers.inboxes - [@account.preferred_inbox_url]
+
+    ActivityPub::LowPriorityDeliveryWorker.push_bulk(inboxes) do |inbox_url|
+      [payload, replied_to_status.account_id, inbox_url]
+    end
   end
 
   def delete_now!