about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-02-13 16:19:15 +0100
committerGitHub <noreply@github.com>2019-02-13 16:19:15 +0100
commit435a367c108047170dc752ef766a4264dd90b5c8 (patch)
tree95de2a7f37a8c2345175550fbce54f207b4aec7d /app/services
parenta3ba28eb17d75af37396359e8c37675e06605ccf (diff)
parent614ea184bb911a5b86804e05350997bafc605580 (diff)
Merge pull request #914 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/services')
-rw-r--r--app/services/suspend_account_service.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/services/suspend_account_service.rb b/app/services/suspend_account_service.rb
index 1bc2314de..fc3bc03a5 100644
--- a/app/services/suspend_account_service.rb
+++ b/app/services/suspend_account_service.rb
@@ -102,6 +102,10 @@ class SuspendAccountService < BaseService
     ActivityPub::DeliveryWorker.push_bulk(delivery_inboxes) do |inbox_url|
       [delete_actor_json, @account.id, inbox_url]
     end
+
+    ActivityPub::LowPriorityDeliveryWorker.push_bulk(low_priority_delivery_inboxes) do |inbox_url|
+      [delete_actor_json, @account.id, inbox_url]
+    end
   end
 
   def delete_actor_json
@@ -117,7 +121,11 @@ class SuspendAccountService < BaseService
   end
 
   def delivery_inboxes
-    Account.inboxes + Relay.enabled.pluck(:inbox_url)
+    @delivery_inboxes ||= @account.followers.inboxes + Relay.enabled.pluck(:inbox_url)
+  end
+
+  def low_priority_delivery_inboxes
+    Account.inboxes - delivery_inboxes
   end
 
   def associations_for_destruction