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,12 +41,11 @@ class APDelivery extends BaseObject
|
||||||
$data = ActivityPub\Transmitter::createCachedActivityFromItem($target_id);
|
$data = ActivityPub\Transmitter::createCachedActivityFromItem($target_id);
|
||||||
if (!empty($data)) {
|
if (!empty($data)) {
|
||||||
$success = HTTPSignature::transmit($data, $inbox, $uid);
|
$success = HTTPSignature::transmit($data, $inbox, $uid);
|
||||||
}
|
|
||||||
|
|
||||||
if ($success && in_array($cmd, [Delivery::POST, Delivery::COMMENT])) {
|
if ($success && in_array($cmd, [Delivery::POST, Delivery::COMMENT])) {
|
||||||
ItemDeliveryData::incrementQueueDone($target_id);
|
ItemDeliveryData::incrementQueueDone($target_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
Worker::defer();
|
Worker::defer();
|
||||||
|
|
Loading…
Reference in a new issue