]> git.mxchange.org Git - friendica.git/blobdiff - include/queue_fn.php
subscribe-to/follow threads
[friendica.git] / include / queue_fn.php
old mode 100755 (executable)
new mode 100644 (file)
index 3c1087f..e439124
@@ -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) {