X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FItemDeliveryData.php;h=a26c80b1cb1f356a18f3a01f9b70f887362995ae;hb=7b7132971a64a92a685a5fd860fe4709dce1765a;hp=f007537f99c02d687754ae50af8dfaf24996b779;hpb=5a1a5a54dcc3fcbd39c88c2b75592497e58ed9af;p=friendica.git diff --git a/src/Model/ItemDeliveryData.php b/src/Model/ItemDeliveryData.php index f007537f99..a26c80b1cb 100644 --- a/src/Model/ItemDeliveryData.php +++ b/src/Model/ItemDeliveryData.php @@ -1,7 +1,22 @@ . + * */ namespace Friendica\Model; @@ -29,6 +44,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 +119,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 *