|
|
|
@ -14,7 +14,7 @@ class Pubsubhubbub::DistributionWorker
|
|
|
|
|
@subscriptions = active_subscriptions.to_a
|
|
|
|
|
|
|
|
|
|
distribute_public!(stream_entries.reject(&:hidden?))
|
|
|
|
|
distribute_hidden!(stream_entries.reject { |s| !s.hidden? })
|
|
|
|
|
distribute_hidden!(stream_entries.select(&:hidden?))
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
@ -35,7 +35,7 @@ class Pubsubhubbub::DistributionWorker
|
|
|
|
|
@payload = OStatus::AtomSerializer.render(OStatus::AtomSerializer.new.feed(@account, stream_entries))
|
|
|
|
|
@domains = @account.followers.domains
|
|
|
|
|
|
|
|
|
|
Pubsubhubbub::DeliveryWorker.push_bulk(@subscriptions.reject { |s| !allowed_to_receive?(s.callback_url, s.domain) }) do |subscription|
|
|
|
|
|
Pubsubhubbub::DeliveryWorker.push_bulk(@subscriptions.select { |s| allowed_to_receive?(s.callback_url, s.domain) }) do |subscription|
|
|
|
|
|
[subscription.id, @payload]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|