Fix delivery data increment in APDelivery
- Avoid incrementing the queue done if Transmitter::createCachedActivityFromItem fails
This commit is contained in:
parent
7c58944449
commit
3c137e812a
|
@ -41,12 +41,11 @@ 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) {
|
||||
Worker::defer();
|
||||
|
|
Loading…
Reference in a new issue