diff options
author | ThibG <thib@sitedethib.com> | 2020-04-17 22:36:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 22:36:48 +0200 |
commit | 62e65dca11e1c39630db2958c514c45407dcdfa7 (patch) | |
tree | 92b5f9a2f93a2355dd94bac7e63e8fd9c552dafb /app/workers | |
parent | 5fdd5eef5a6b05b072a57e065954fdcb0b4a8898 (diff) | |
parent | 81ef26b67d01aaa693edbdcf7a8f2a6cdfd56920 (diff) |
Merge pull request #1318 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/activitypub/delivery_worker.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/workers/activitypub/delivery_worker.rb b/app/workers/activitypub/delivery_worker.rb index 196af4af1..14e37dc34 100644 --- a/app/workers/activitypub/delivery_worker.rb +++ b/app/workers/activitypub/delivery_worker.rb @@ -12,7 +12,7 @@ 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) + return unless DeliveryFailureTracker.available?(inbox_url) @options = options.with_indifferent_access @json = json @@ -23,10 +23,12 @@ class ActivityPub::DeliveryWorker perform_request ensure - if @performed - failure_tracker.track_success! - else - failure_tracker.track_failure! + if @inbox_url.present? + if @performed + failure_tracker.track_success! + else + failure_tracker.track_failure! + end end end |