Skip to content

Resolve short Bluesky handles to bsky.social - #8

Merged
Jeehut merged 1 commit into
mainfrom
wip/bluesky-short-handles
Oct 13, 2026
Merged

Jeehut merged 1 commit into
mainfrom
wip/bluesky-short-handles

Conversation

@Jeehut

@Jeehut Jeehut commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Picks up the problem from #6 by @n0rthk1n9 without changing the API.

Bluesky handles are domain names: n0rthk1n9.bsky.social for an account on the default server, or a custom domain like fline.dev. LinksKit shares one handle across platforms, so with handle: "Jeehut" for Twitter, Mastodon and Bluesky the Bluesky link pointed at bsky.app/profile/Jeehut, which does not exist.

SocialPlatform.bluesky now normalizes the handle before building the URL:

Handle passed Link before Link now
jeehut bsky.app/profile/jeehut ✘ bsky.app/profile/jeehut.bsky.social
Jeehut bsky.app/profile/Jeehut ✘ bsky.app/profile/jeehut.bsky.social
@jeehut bsky.app/profile/@Jeehut ✘ bsky.app/profile/jeehut.bsky.social
jeehut.bsky.social unchanged unchanged
fline.dev unchanged unchanged

#6 proposed case bluesky(instance: String), analogous to Mastodon. As its author noted in the thread, that breaks custom-domain handles, which have no instance suffix – and it would be a breaking change for everyone using .bluesky. A dot in the handle tells both cases apart reliably, since every full Bluesky handle is a domain.

How this was verified

LinksKit had no tests yet; this adds a LinksKitTests target. SocialPlatformTests covers the five handles above plus @fline.dev, and Mastodon. With the old URL code it failed for the four handles that are short or start with @; on this branch it passes:

# old URL building
✘ blueskyLinksResolveShortAndCustomDomainHandles(handle:expected:) with 6 test cases failed with 4 issues.

# this branch
✔ Test run with 2 tests in 1 suite passed.

jeehut.bsky.social was confirmed to exist through Bluesky's public app.bsky.actor.getProfile API.

Bluesky handles are domain names, but most people know their account by
the short name, and LinksKit shares one handle across platforms: with
handle "Jeehut" for Twitter, Mastodon and Bluesky, the Bluesky link
pointed at bsky.app/profile/Jeehut, which does not exist. A handle
without a dot now resolves to <name>.bsky.social, a leading @ is
dropped, and custom-domain handles stay as they are.

The package gets its first test target for this.
@Jeehut
Jeehut force-pushed the wip/bluesky-short-handles branch from bb9eae9 to aaf12e6 Compare October 13, 2026 10:33
@Jeehut
Jeehut changed the base branch from wip/apple-address-style to main October 13, 2026 10:33
@Jeehut Jeehut closed this Oct 13, 2026
@Jeehut Jeehut reopened this Oct 13, 2026
@Jeehut
Jeehut merged commit 2979caa into main Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant