From: Hypolite Petovan Date: Sat, 9 Feb 2019 04:20:15 +0000 (-0500) Subject: Fix delivery data increment in APDelivery X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3c137e812a58e7f4c27245f3daf9e56fbc720cab;p=friendica.git Fix delivery data increment in APDelivery - Avoid incrementing the queue done if Transmitter::createCachedActivityFromItem fails --- diff --git a/src/Worker/APDelivery.php b/src/Worker/APDelivery.php index 634a9446eb..2048b97d02 100644 --- a/src/Worker/APDelivery.php +++ b/src/Worker/APDelivery.php @@ -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); + } } }