From b27487ace064b6578c0ac4789d3b1ea051666250 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Wed, 12 Jun 2019 18:25:48 +0200 Subject: [PATCH] [TwitterBridge] Fix detection of retweets on lists References #1161 --- bridges/TwitterBridge.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/TwitterBridge.php b/bridges/TwitterBridge.php index 91facce6..76ca5305 100644 --- a/bridges/TwitterBridge.php +++ b/bridges/TwitterBridge.php @@ -189,7 +189,7 @@ EOD // Skip retweets? if($this->getInput('noretweet') - && strcasecmp($tweet->getAttribute('data-screen-name'), $this->getInput('u'))) { + && $tweet->find('div.context span.js-retweet-text a', 0)) { continue; } @@ -213,8 +213,8 @@ EOD $item['fullname'] = htmlspecialchars_decode($tweet->getAttribute('data-name'), ENT_QUOTES); // get author $item['author'] = $item['fullname'] . ' (@' . $item['username'] . ')'; - if(strcasecmp($tweet->getAttribute('data-screen-name'), $this->getInput('u'))) { - $item['author'] .= ' RT: @' . $this->getInput('u'); + if($rt = $tweet->find('div.context span.js-retweet-text a', 0)) { + $item['author'] .= ' RT: @' . $rt->plaintext; } // get avatar link $item['avatar'] = $tweet->find('img', 0)->src;