]> git.mxchange.org Git - friendica-addons.git/commitdiff
fromgplus: Don't post posting that are too young. It could happen that the picture...
authorMichael Vogel <icarus@dabo.de>
Mon, 21 Jul 2014 22:38:52 +0000 (00:38 +0200)
committerMichael Vogel <icarus@dabo.de>
Mon, 21 Jul 2014 22:38:52 +0000 (00:38 +0200)
fromgplus/fromgplus.php

index 137b294042b7bb19eca920d90de5456ba673b5ab..9699ba9b32d8c3059297a0564138f1c0a2021167 100644 (file)
@@ -391,6 +391,12 @@ function fromgplus_fetch($a, $uid) {
                if (strtotime($item->published) <= $initiallastdate)
                        continue;
 
+               // Don't publish items that are too young
+               if (strtotime($item->published) > (time() - 3*60)) {
+                       logger('fromgplus_fetch: item too new '.$item->published);
+                       continue;
+               }
+
                if ($lastdate < strtotime($item->published))
                        $lastdate = strtotime($item->published);