X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fqueue_fn.php;h=e43912431c762fff263432701f0c02f914457df8;hb=fc27edb6d76765cd9b85d29a3c41f23f17c6ca41;hp=3c1087f4eb68fb32d12608ba54af35f8cb6e6723;hpb=355c42cb309eb1313097411067ca999b699aa620;p=friendica.git diff --git a/include/queue_fn.php b/include/queue_fn.php index 3c1087f4eb..e43912431c 100644 --- a/include/queue_fn.php +++ b/include/queue_fn.php @@ -15,6 +15,24 @@ function remove_queue_item($id) { ); } +function was_recently_delayed($cid) { + + $r = q("SELECT `id` FROM `queue` WHERE `cid` = %d + and last > UTC_TIMESTAMP() - interval 15 minute limit 1", + intval($cid) + ); + if(count($r)) + return true; + + $r = q("select `term-date` from contact where id = %d and `term-date` != '' and `term-date` != '0000-00-00 00:00:00' limit 1", + intval($cid) + ); + if(count($r)) + return true; + + return false; +} + function add_to_queue($cid,$network,$msg,$batch = false) {