From 06ebd2964ab68aa295f3385c188f40c33e3e0a23 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 18 Jun 2025 19:25:14 +0300 Subject: Fix linking to specific search results (#8520) * fix linking to bsky.app/search?q=xyz * add name to comment * skip if notfound --- src/lib/strings/url-helpers.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib/strings/url-helpers.ts') diff --git a/src/lib/strings/url-helpers.ts b/src/lib/strings/url-helpers.ts index ad194714a..288f428c1 100644 --- a/src/lib/strings/url-helpers.ts +++ b/src/lib/strings/url-helpers.ts @@ -193,6 +193,11 @@ export function convertBskyAppUrlIfNeeded(url: string): string { return startUriToStarterPackUri(urlp.pathname) } + // special-case search links + if (urlp.pathname === '/search') { + return `/search?q=${urlp.searchParams.get('q')}` + } + return urlp.pathname } catch (e) { console.error('Unexpected error in convertBskyAppUrlIfNeeded()', e) -- cgit 1.4.1