Fix delivery data increment in APDelivery
- Avoid incrementing the queue done if Transmitter::createCachedActivityFromItem fails
This commit is contained in:
parent
7c58944449
commit
3c137e812a
1 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue