forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1export function parseLinkingUrl(url: string): URL {
2 /*
3 * Hack: add a third slash to bluesky:// urls so that `URL.host` is empty and
4 * `URL.pathname` has the full path.
5 */
6 if (url.startsWith('bluesky://') && !url.startsWith('bluesky:///')) {
7 url = url.replace('bluesky://', 'bluesky:///')
8 }
9 return new URL(url)
10}