From 4165479079faf4a8bb63d08574e0ff10cd4950ab Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 30 Oct 2024 05:11:50 +0000 Subject: [PATCH] Bluesky: Fix probe mistake --- bluesky/bluesky.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bluesky/bluesky.php b/bluesky/bluesky.php index 45a56792..af7d9ac7 100644 --- a/bluesky/bluesky.php +++ b/bluesky/bluesky.php @@ -181,7 +181,7 @@ function bluesky_item_by_link(array &$hookData) return; } - if (!preg_match('#/profile/(.+)/post/(.+)#', $hookData['uri'], $matches)) { + if (!preg_match('#^' . BLUESKY_WEB . '/profile/(.+)/post/(.+)#', $hookData['uri'], $matches)) { return; } @@ -1833,7 +1833,7 @@ function bluesky_get_preferences(int $uid): ?stdClass 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); if (!empty($did)) { return $did;