]> git.mxchange.org Git - friendica.git/commitdiff
Fix delivery data increment in APDelivery
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Feb 2019 04:20:15 +0000 (23:20 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Feb 2019 04:20:15 +0000 (23:20 -0500)
- Avoid incrementing the queue done if Transmitter::createCachedActivityFromItem fails

src/Worker/APDelivery.php

index 634a9446ebfc85ba63a04805bc49ef9ebc6daf35..2048b97d02259261d5dc71eabdafd9fc115c7035 100644 (file)
@@ -41,10 +41,9 @@ class APDelivery extends BaseObject
                        $data = ActivityPub\Transmitter::createCachedActivityFromItem($target_id);
                        if (!empty($data)) {
                                $success = HTTPSignature::transmit($data, $inbox, $uid);
-                       }
-
-                       if ($success && in_array($cmd, [Delivery::POST, Delivery::COMMENT])) {
-                               ItemDeliveryData::incrementQueueDone($target_id);
+                               if ($success && in_array($cmd, [Delivery::POST, Delivery::COMMENT])) {
+                                       ItemDeliveryData::incrementQueueDone($target_id);
+                               }
                        }
                }