]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/ItemDeliveryData.php
Shorten "Configuration" to "Config" again, since the Wrapper is gone
[friendica.git] / src / Model / ItemDeliveryData.php
index f007537f99c02d687754ae50af8dfaf24996b779..3e2a75598a57dd2f6b0df41646eb8613542cf915 100644 (file)
@@ -29,6 +29,7 @@ class ItemDeliveryData
        const LEGACY_DFRN = 3;
        const DIASPORA = 4;
        const OSTATUS = 5;
+       const MAIL = 6;
 
        /**
         * Extract delivery data from the provided item fields
@@ -103,6 +104,19 @@ class ItemDeliveryData
                return DBA::e('UPDATE `item-delivery-data` SET `queue_failed` = `queue_failed` + 1 WHERE `iid` = ?', $item_id);
        }
 
+       /**
+        * Increments the queue_count for the given item ID.
+        *
+        * @param integer $item_id
+        * @param integer $increment
+        * @return bool
+        * @throws \Exception
+        */
+       public static function incrementQueueCount(int $item_id, int $increment = 1)
+       {
+               return DBA::e('UPDATE `item-delivery-data` SET `queue_count` = `queue_count` + ? WHERE `iid` = ?', $increment, $item_id);
+       }
+
        /**
         * Insert a new item delivery data entry
         *