From cc0669a7454306728a838258bd36c02387246c2d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 11 Jul 2016 06:44:36 +0200 Subject: [PATCH] Twitter: Prevent posting loops --- twitter/twitter.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index 07fa58ad..8f023dfe 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -771,8 +771,10 @@ function twitter_fetchtimeline($a, $uid) { if (count($posts)) { foreach ($posts as $post) { - if ($post->id_str > $lastid) + if ($post->id_str > $lastid) { $lastid = $post->id_str; + set_pconfig($uid, 'twitter', 'lastid', $lastid); + } if ($first_time) continue; @@ -1698,8 +1700,10 @@ function twitter_fetchhometimeline($a, $uid) { if (count($posts)) { foreach ($posts as $post) { - if ($post->id_str > $lastid) + if ($post->id_str > $lastid) { $lastid = $post->id_str; + set_pconfig($uid, 'twitter', 'lasthometimelineid', $lastid); + } if ($first_time) continue; -- 2.39.5