mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 01:43:42 +00:00
[twitter] Improve mobile profile URL probe
This commit is contained in:
parent
94c658b105
commit
44bf674727
1 changed files with 2 additions and 2 deletions
|
@ -465,9 +465,9 @@ function twitter_probe_detect(App $a, array &$hookData)
|
|||
return;
|
||||
}
|
||||
|
||||
if (preg_match('=(.*)@twitter.com=i', $hookData['uri'], $matches)) {
|
||||
if (preg_match('=([^@]+)@(?:mobile\.)?twitter\.com$=i', $hookData['uri'], $matches)) {
|
||||
$nick = $matches[1];
|
||||
} elseif (preg_match('=https?://(?:mobile\.)?twitter.com/(.*)=i', $hookData['uri'], $matches)) {
|
||||
} elseif (preg_match('=^https?://(?:mobile\.)?twitter\.com/(.+)=i', $hookData['uri'], $matches)) {
|
||||
$nick = $matches[1];
|
||||
} else {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue