]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Delivery.php
Fix searching for contacts
[friendica.git] / src / Worker / Delivery.php
index 6cd824365175ee8b0b52d95cc09f61010e2dd2eb..97a0968510c5cf945cfd1d3f8915a5e90d7c86dc 100644 (file)
@@ -26,7 +26,8 @@ class Delivery extends BaseObject
        const RELOCATION    = 'relocate';
        const DELETION      = 'drop';
        const POST          = 'wall-new';
-       const COMMENT       = 'comment-new';
+       const POKE          = 'poke';
+       const UPLINK        = 'uplink';
        const REMOVAL       = 'removeme';
        const PROFILEUPDATE = 'profileupdate';
 
@@ -283,6 +284,11 @@ class Delivery extends BaseObject
                        }
 
                        DFRN::import($atom, $target_importer);
+
+                       if (in_array($cmd, [Delivery::POST, Delivery::POKE])) {
+                               Model\ItemDeliveryData::incrementQueueDone($target_item['id']);
+                       }
+
                        return;
                }
 
@@ -317,7 +323,7 @@ class Delivery extends BaseObject
                        // We successfully delivered a message, the contact is alive
                        Model\Contact::unmarkForArchival($contact);
 
-                       if (in_array($cmd, [Delivery::POST, Delivery::COMMENT])) {
+                       if (in_array($cmd, [Delivery::POST, Delivery::POKE])) {
                                Model\ItemDeliveryData::incrementQueueDone($target_item['id']);
                        }
                } else {
@@ -398,7 +404,7 @@ class Delivery extends BaseObject
                        // We successfully delivered a message, the contact is alive
                        Model\Contact::unmarkForArchival($contact);
 
-                       if (in_array($cmd, [Delivery::POST, Delivery::COMMENT])) {
+                       if (in_array($cmd, [Delivery::POST, Delivery::POKE])) {
                                Model\ItemDeliveryData::incrementQueueDone($target_item['id']);
                        }
                } else {
@@ -409,7 +415,7 @@ class Delivery extends BaseObject
                                Logger::info('Delivery failed: defer message', ['id' => defaults($target_item, 'guid', $target_item['id'])]);
                                // defer message for redelivery
                                Worker::defer();
-                       } elseif (in_array($cmd, [Delivery::POST, Delivery::COMMENT])) {
+                       } elseif (in_array($cmd, [Delivery::POST, Delivery::POKE])) {
                                Model\ItemDeliveryData::incrementQueueDone($target_item['id']);
                        }
                }
@@ -437,7 +443,7 @@ class Delivery extends BaseObject
                        return;
                }
 
-               if (!in_array($cmd, [self::POST, self::COMMENT])) {
+               if (!in_array($cmd, [self::POST, self::POKE])) {
                        return;
                }