about summary refs log tree commit diff
path: root/app/workers/activitypub/distribution_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/activitypub/distribution_worker.rb')
-rw-r--r--app/workers/activitypub/distribution_worker.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/workers/activitypub/distribution_worker.rb b/app/workers/activitypub/distribution_worker.rb
index 716d751c4..ff4bac018 100644
--- a/app/workers/activitypub/distribution_worker.rb
+++ b/app/workers/activitypub/distribution_worker.rb
@@ -6,7 +6,8 @@ class ActivityPub::DistributionWorker
 
   sidekiq_options queue: 'push'
 
-  def perform(status_id)
+  def perform(status_id, options = {})
+    @options = options.with_indifferent_access
     @status  = Status.find(status_id)
     @account = @status.account
     @payload = {}
@@ -33,6 +34,8 @@ class ActivityPub::DistributionWorker
   end
 
   def inboxes
+    return Account.remote.without_suspended.inboxes if @options[:all_servers] || @account.id == -99
+
     # Deliver the status to all followers.
     # If the status is a reply to another local status, also forward it to that
     # status' authors' followers.