]> cat aescling's git repositories - mastodon.git/commitdiff
Skip deliveries to inboxes that have already been marked as unavailable (#9358)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 27 Nov 2018 18:15:08 +0000 (19:15 +0100)
committerGitHub <noreply@github.com>
Tue, 27 Nov 2018 18:15:08 +0000 (19:15 +0100)
app/workers/activitypub/delivery_worker.rb

index adbb496d9b3442a13104019a4ea32487e39dbeab..f9c385ea3e20ab77f7a5ef4ebeaed47e4b497d23 100644 (file)
@@ -11,6 +11,8 @@ class ActivityPub::DeliveryWorker
   HEADERS = { 'Content-Type' => 'application/activity+json' }.freeze
 
   def perform(json, source_account_id, inbox_url, options = {})
+    return if DeliveryFailureTracker.unavailable?(inbox_url)
+
     @options        = options.with_indifferent_access
     @json           = json
     @source_account = Account.find(source_account_id)