diff options
Diffstat (limited to 'app/workers/pubsubhubbub')
-rw-r--r-- | app/workers/pubsubhubbub/delivery_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/pubsubhubbub/distribution_worker.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/pubsubhubbub/delivery_worker.rb b/app/workers/pubsubhubbub/delivery_worker.rb index 2e1101b93..035a59048 100644 --- a/app/workers/pubsubhubbub/delivery_worker.rb +++ b/app/workers/pubsubhubbub/delivery_worker.rb @@ -23,7 +23,7 @@ class Pubsubhubbub::DeliveryWorker def process_delivery payload_delivery - raise "Delivery failed for #{subscription.callback_url}: HTTP #{payload_delivery.code}" unless response_successful? + raise Mastodon::UnexpectedResponseError, payload_delivery unless response_successful? subscription.touch(:last_successful_delivery_at) end diff --git a/app/workers/pubsubhubbub/distribution_worker.rb b/app/workers/pubsubhubbub/distribution_worker.rb index 9c1fa76cb..ce467d18b 100644 --- a/app/workers/pubsubhubbub/distribution_worker.rb +++ b/app/workers/pubsubhubbub/distribution_worker.rb @@ -22,7 +22,7 @@ class Pubsubhubbub::DistributionWorker def distribute_public!(stream_entries) return if stream_entries.empty? - @payload = Ostatus::AtomSerializer.render(Ostatus::AtomSerializer.new.feed(@account, stream_entries)) + @payload = OStatus::AtomSerializer.render(OStatus::AtomSerializer.new.feed(@account, stream_entries)) Pubsubhubbub::DeliveryWorker.push_bulk(@subscriptions) do |subscription| [subscription.id, @payload] @@ -32,7 +32,7 @@ class Pubsubhubbub::DistributionWorker def distribute_hidden!(stream_entries) return if stream_entries.empty? - @payload = Ostatus::AtomSerializer.render(Ostatus::AtomSerializer.new.feed(@account, stream_entries)) + @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| |