blob: d73466f6e5cbb9ab50812446d8bea8e9c4e02d91 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
class ActivityPub::RawDistributionWorker
include Sidekiq::Worker
sidekiq_options queue: 'push'
def perform(json, source_account_id)
@account = Account.find(source_account_id)
ActivityPub::DeliveryWorker.push_bulk(inboxes) do |inbox_url|
[json, @account.id, inbox_url]
end
rescue ActiveRecord::RecordNotFound
true
end
private
def inboxes
@inboxes ||= @account.followers.inboxes
end
end
|