Fix linking to specific search results (#8520)

* fix linking to bsky.app/search?q=xyz

* add name to comment

* skip if notfound
This commit is contained in:
Samuel Newman
2025-06-18 19:25:14 +03:00
committed by GitHub
parent 3304cd0424
commit 06ebd2964a
3 changed files with 45 additions and 7 deletions
+5
View File
@@ -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)