Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AT URIs as alternate links #6033

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

tom-sherman
Copy link
Contributor

@tom-sherman tom-sherman commented Oct 31, 2024

Note

I'm not sure how to test this or if this is where the change needs to actually go. I've pattern matched against the received HTML in prod and found these files, so let me know if it's incorrect and I'll rework this!

See likeandscribe/frontpage#172 for the description of why I'd like to make this change.

Some extra discussion here: https://bsky.app/profile/did:plc:2xau7wbgdq4phuou2ypwuen7/post/3l7esaih44s2s

@bnewbold
Copy link
Contributor

bnewbold commented Nov 1, 2024

I'm default ok with this, though it feels a bit under-specified. Should there be a type field, and if so what value?

There is a small related tension with AT URIs not quite being valid "URL" syntax, following WHATWG standards: https://url.spec.whatwg.org/

The issue is that there are multiple colons in the DID in the "authority" segment of the URI. I think there is a path to relaxing the spec to allow this specific pattern (DIDs in that part of URL), but it will be a delicate conversation: browsers have tons of noisy inbound requests and it is important to be diplomatic and make a clear case.

Anyways, probably none of that is a reason not to go ahead with this. Be bold!

@gaearon gaearon merged commit 193954d into bluesky-social:main Nov 1, 2024
6 checks passed
@mary-ext
Copy link
Contributor

mary-ext commented Nov 1, 2024

shouldn't profiles link to app.bsky.actor.profile record?

it seems very ambiguous, what does at://mary.my.id actually mean?

  1. am I linking to my account's repository?
  2. am I linking to my Bluesky profile?
  3. am I linking to my linkat.blue page?
  4. am I linking to my <some other services here>'s profile?

I'm not sure if it's a good idea to interpret at://<account identifier> as specifically for Bluesky profiles.

this change sets a precedent for apps/extensions registering a handler or sniffing for a specific URI, and it'd be bad when we do have multiple extensions/apps checking for this specific URI, because the URI doesn't specify what we actually want to show.

@bnewbold
Copy link
Contributor

bnewbold commented Nov 1, 2024

@mary-ext I think that at://<identifier> definitely does not imply anything bsky specific. An atproto account (identified by DID or handle) definitely could mean any or all of the things you mentioned.

I don't think that having a <link rel="alternative"> pointing to an overall account in this way would imply an equivalency of the account with the page itself. It does make sense to me to link something like a bsky profile view page to the "overall account".

In practical terms, it does probably make more sense to tie https://bsky.app/profile/<identifier> to a profile record (so full AT URI), if nothing else because it includes the account identifier anyways.

(note that this codebase could be forked/white-labeled to run on other domains; in that case the relevant thing is still probably the app.bsky.actor.profile record)

@bnewbold
Copy link
Contributor

bnewbold commented Nov 1, 2024

FWIW, I think it would also be fine/appropriate to have both a ref to the bsky profile record, and the atproto account identifier. Or even just the bare DID.

@ngerakines
Copy link

Aren't brackets acceptable for URLs? Like, an ipv6 URL looks like http://[::1]. Personally, I don't see any issue with at://[did:plc:tgudj2fjm77pzkuawquqhsxm]/events.smokesignal.calendar.event/3kxbvxj7blk2t.

rshigg pushed a commit to rshigg/social-app that referenced this pull request Nov 2, 2024
rshigg pushed a commit to rshigg/social-app that referenced this pull request Nov 2, 2024
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.

5 participants