x/tools/present: ActivityPub (e.g. Mastodon) handles are parsed as Twitter usernames #57982
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Created a slide file, e.g.
and ran
present
What did you expect to see?
Ideally, the author details page would make "@tuckerman@hachyderm.io" a hyperlink to https://hachyderm.io/@tuckerman or not hyperlinked at all.
What did you see instead?
It links to http://twitter.com/tuckerman@hachyderm.io
Thoughts
Technically converting
@foo@example.com
into a URI requires a WebFinger lookup but, in the spirit of keeping the present tool simple, it seems reasonable to a) checkstrings.Contains(text[1:], "@")
and just not hyperlink it to Twitter or b) make the same check, split on the second "@" and hyperlink it to"https://"+components[1]+"/@"+components[0]
.I'd personally find the latter convenient as it seems the ability to host an activitypub server on a different domain than the one in the handle using WebFinger isn't very popular. I can understand not wanting to do something technically incorrect in an official package, in which case I'd still prefer not auto-hyperlinking to Twitter (I think doing any WebFinger lookups is far beyond the expected scope of present).
I have changes for either option locally if folks would be open to making this change.
The text was updated successfully, but these errors were encountered: