[TwitterBridge] Append username of retweeter to author (#1016)

Append username of retweeter to author. Useful when viewing all unread tweets in an RSS reader which are not sorted within username folders.
This commit is contained in:
triatic 2019-02-04 13:56:07 +00:00 committed by LogMANOriginal
parent 394149b114
commit 25593d9c18

View file

@ -165,7 +165,7 @@ class TwitterBridge extends BridgeAbstract {
// Skip retweets?
if($this->getInput('noretweet')
&& $tweet->getAttribute('data-screen-name') !== $this->getInput('u')) {
&& strcasecmp($tweet->getAttribute('data-screen-name'), $this->getInput('u'))) {
continue;
}
@ -189,6 +189,9 @@ class TwitterBridge extends BridgeAbstract {
$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');
}
// get avatar link
$item['avatar'] = $tweet->find('img', 0)->src;
// get TweetID