[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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -266,7 +266,7 @@ EOD
$item['username'] = $user_info->screen_name; $item['username'] = $user_info->screen_name;
$item['fullname'] = $user_info->name; $item['fullname'] = $user_info->name;
$item['author'] = $item['fullname'] . ' (@' . $item['username'] . ')'; $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['author'] .= ' RT: @' . $this->getInput('u');
} }
$item['avatar'] = $user_info->profile_image_url_https; $item['avatar'] = $user_info->profile_image_url_https;
@ -388,7 +388,7 @@ EOD;
} }
break; break;
case 'By username': 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! continue 2; // switch + for-loop!
} }
break; break;