diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-09-19 16:56:21 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-09-19 17:41:24 -0500 |
commit | f190e3c8c4840e6f92b90d913096e80eafc893eb (patch) | |
tree | 2ec9486918dd3db72f39b2d1cfb56244aeba5e4f /app/workers/activitypub/distribution_worker.rb | |
parent | 172cdaa3282e2e144722a866fdfdb74b9baf7e59 (diff) |
[Federation] Add support for distributing ActivityPub events to all unsuspended inboxes
Diffstat (limited to 'app/workers/activitypub/distribution_worker.rb')
-rw-r--r-- | app/workers/activitypub/distribution_worker.rb | 5 |
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. |