1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-30 13:20:12 +02:00

[TwitterBridge] Fix username matching to be case insensitive with noretweet option (#1924)

This commit is contained in:
Derrick Lee
2021-01-10 00:19:38 -08:00
committed by GitHub
parent 5ed161943c
commit 6b870f0c3e

View File

@@ -266,7 +266,7 @@ EOD
$item['username'] = $user_info->screen_name;
$item['fullname'] = $user_info->name;
$item['author'] = $item['fullname'] . ' (@' . $item['username'] . ')';
if (null !== $this->getInput('u') && $item['username'] != $this->getInput('u')) {
if (null !== $this->getInput('u') && strtolower($item['username']) != strtolower($this->getInput('u'))) {
$item['author'] .= ' RT: @' . $this->getInput('u');
}
$item['avatar'] = $user_info->profile_image_url_https;
@@ -388,7 +388,7 @@ EOD;
}
break;
case 'By username':
if ($this->getInput('noretweet') && $item['username'] != $this->getInput('u')) {
if ($this->getInput('noretweet') && strtolower($item['username']) != strtolower($this->getInput('u'))) {
continue 2; // switch + for-loop!
}
break;