Bluesky: Fix probe mistake #1560

Merged
tobias merged 1 commit from heluecht/friendica-addons:bluesky-full-path into 2024.09-rc 2024-10-30 07:33:35 +01:00

View file

@ -181,7 +181,7 @@ function bluesky_item_by_link(array &$hookData)
return; return;
} }
if (!preg_match('#/profile/(.+)/post/(.+)#', $hookData['uri'], $matches)) { if (!preg_match('#^' . BLUESKY_WEB . '/profile/(.+)/post/(.+)#', $hookData['uri'], $matches)) {
return; return;
} }
@ -1833,7 +1833,7 @@ function bluesky_get_preferences(int $uid): ?stdClass
function bluesky_get_did_by_profile(string $url, int $uid): string function bluesky_get_did_by_profile(string $url, int $uid): string
{ {
if (preg_match('#/profile/(.+)#', $url, $matches)) { if (preg_match('#^' . BLUESKY_WEB . '/profile/(.+)#', $url, $matches)) {
$did = bluesky_get_did($matches[1], $uid); $did = bluesky_get_did($matches[1], $uid);
if (!empty($did)) { if (!empty($did)) {
return $did; return $did;