Merge pull request #358 from annando/1607-twitter-loop

Twitter: Prevent posting loops
This commit is contained in:
Tobias Diekershoff 2016-07-11 07:25:49 +02:00 committed by GitHub
commit f71faed2d0

View File

@ -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;