]> git.mxchange.org Git - friendica.git/commitdiff
Support dropping delivery for single message transfer as well
authorMichael <heluecht@pirati.ca>
Tue, 24 May 2022 12:32:04 +0000 (12:32 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 24 May 2022 12:32:04 +0000 (12:32 +0000)
src/Worker/APDelivery.php

index 4703b8ca165f32b391959d27dd8de1500533b4f8..203c4097612d97fd04812d0dae80c8c57c50bfb3 100644 (file)
@@ -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);