···167167 } catch (e) {
168168 console.error('Unexpected error in convertBskyAppUrlIfNeeded()', e)
169169 }
170170+ } else if (isShortLink(url)) {
171171+ // We only want to do this on native, web handles the 301 for us
172172+ return shortLinkToHref(url)
170173 }
171174 return url
172175}
···288291}
289292290293export function isShortLink(url: string): boolean {
294294+ return url.startsWith('https://go.bsky.app/')
295295+}
296296+297297+export function shortLinkToHref(url: string): string {
291298 try {
292299 const urlp = new URL(url)
293293- return urlp.host === 'go.bsky.app'
300300+301301+ // For now we only support starter packs, but in the future we should add additional paths to this check
302302+ const parts = urlp.pathname.split('/').filter(Boolean)
303303+ if (parts.length === 1) {
304304+ return `/starter-pack-short/${parts[0]}`
305305+ }
306306+ return url
294307 } catch (e) {
295308 logger.error('Failed to parse possible short link', {safeMessage: e})
296296- return false
309309+ return url
297310 }
298311}