X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fqueue_fn.php;h=e43912431c762fff263432701f0c02f914457df8;hb=cef516956799589c7a7a17c57e7576a87047418f;hp=3c1087f4eb68fb32d12608ba54af35f8cb6e6723;hpb=8aa25523721303b6883e1a793f20997f8a33ec0a;p=friendica.git diff --git a/include/queue_fn.php b/include/queue_fn.php old mode 100755 new mode 100644 index 3c1087f4eb..e43912431c --- 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) {