From bee6ffe968858a9c9b3b67c4225d11a2942ae61a Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 24 May 2022 12:32:04 +0000 Subject: [PATCH] Support dropping delivery for single message transfer as well --- src/Worker/APDelivery.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Worker/APDelivery.php b/src/Worker/APDelivery.php index 4703b8ca16..203c409761 100644 --- a/src/Worker/APDelivery.php +++ b/src/Worker/APDelivery.php @@ -66,14 +66,16 @@ class APDelivery if (empty($uri_id)) { $result = ActivityPub\Delivery::deliver($inbox); $success = $result['success']; + $drop = false; $uri_ids = $result['uri_ids']; } else { $result = ActivityPub\Delivery::deliverToInbox($cmd, $item_id, $inbox, $uid, $receivers, $uri_id); $success = $result['success']; + $drop = $result['drop']; $uri_ids = [$uri_id]; } - if (!$success && !Worker::defer() && !empty($uri_ids)) { + if (!$drop && !$success && !Worker::defer() && !empty($uri_ids)) { foreach ($uri_ids as $uri_id) { Post\Delivery::remove($uri_id, $inbox); Post\DeliveryData::incrementQueueFailed($uri_id); -- 2.39.5