[dreamwidth/dreamwidth] 17fb5f: Add support for @mentions and [Unknown site tag] mentions for ...
Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: 17fb5f6dc0f31248f64f5eb0d12b61c239f9bb47 https://github.com/dreamwidth/dreamwidth/commit/17fb5f6dc0f31248f64f5eb0d12b61c239f9bb47 Author: Joshua Barrett jjbarr@ptnote.dev Date: 2026-02-25 (Wed, 25 Feb 2026)
Changed paths: M cgi-bin/DW/External/Site.pm A cgi-bin/DW/External/Site/Atproto.pm A cgi-bin/DW/External/Site/Bluesky.pm A cgi-bin/DW/External/Site/BlueskySocial.pm M cgi-bin/LJ/CleanHTML.pm M t/cleaner-markdown.t
Log Message:
Add support for
mentions and [Unknown site tag] mentions for bluesky. (#3524)
- Add support for
mentions and [Unknown site tag] mentions for bluesky.
Bluesky usernames are FQDNs, and prior to now the [Bad username or site: user @ site] syntax has
used the first dot to indicate where the username ends. Since this won't
work for services where the username is the domain name, a special case
has been introduced: if the final dotted segment in an
mention is
shorthand for an atproto-based site, everything else is assumed to be a
username. This does introduce an irregularity:
user
works to reference the bluesky user
user, but
user does NOT. This is done to prevent the mention
as a whole from being a valid domain name (and because future atproto
sites may eventually allow usernames that make such constructs
ambiguous).
In addition to "bsky.app" and the "bsky" shorthand being added,
"bsky.social" has been added to make referencing users with the default
domain bluesky uses easier. An "Atproto" site,
DW::External::Site::Atproto, as also been added as a place to store
common code. It is complete and links to an "account overview" page
listing services associated with the account, but has not yet been
exposed to users.
At present, bluesky accounts are linked to by username, not be DID. This may be subject to future change.
CODE TOUR: It's now possible to reference bluesky accounts with
@mentions! @username.bsky.social works the way you would expect.
If a user has a custom username, you can suffix it with .bsky to make
the link work (eg, @user.example.com.bsky). <user> tags also work
as you would expect (<user name=user.bsky.social site=bsky.app>,
<user name=user site=bsky.social>, and
<user name=user.example.com site=bsky.app> all do what you expect).
- https and minor nit fixes
To unsubscribe from these emails, change your notification settings at https://github.com/dreamwidth/dreamwidth/settings/notifications
