Skip to content

Commit

Permalink
[TwitterBridge] Fix detection of retweets on lists
Browse files Browse the repository at this point in the history
References #1161
  • Loading branch information
logmanoriginal committed Jun 12, 2019
1 parent d005acc commit b27487a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bridges/TwitterBridge.php
Expand Up @@ -189,7 +189,7 @@ public function collectData(){

// 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;
}

Expand All @@ -213,8 +213,8 @@ public function collectData(){
$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;
Expand Down

0 comments on commit b27487a

Please sign in to comment.