gabipurcaru / followgraph

MIT License
207 stars 22 forks source link

Incorrectly handling certain handles #4

Open spinza opened 1 year ago

spinza commented 1 year ago

My handle is like user@example.com but the instance is running at mastodon.example.com. This is a config that is standard per Mastodon software.

See web domain setting here: https://docs.joinmastodon.org/admin/config/#web_domain.

I seem to have to provide user@mastodon.example.com for this tool to work.

ineffyble commented 1 year ago

That's pretty standard for most tools like this. Technically you can implement a webfinger lookup to find the API, but yeah. I haven't seen any tools that do that.

cosmin commented 1 year ago

Came to report the same thing, it really should support web finger to look up the proper domain to query for a given handle (perhaps as a fallback if trying to hit the domain in the handle itself doesn't respond to the API)

TonyHoyle commented 1 year ago

webfinger is a core part of mastodon.. without it a lot of handles simply won't work, and a casual user is unlikely to know why.

danorton commented 1 year ago

Here is why it’s a bug not to properly implement webfinger:

See the documentation on webfinger at https://docs.joinmastodon.org/spec/webfinger/

At the time of this post, it reads, in part:

⚠️ Because Mastodon heavily relies on mentions for addressing other profiles, WebFinger is required for fully interoperating with Mastodon. Users can generally load profiles by searching for the direct HTTPS URI if they know it, or for the username@domain address, but Mastodon’s internal logic depends almost completely on acct: URIs or username@domain representations. Searching for any objects or profiles from an ActivityPub implementation without WebFinger will fail because the author cannot be converted to a user in the local database. [emphasis in original]

Also see the documentation for the WEB_DOMAIN configuration variable at https://docs.joinmastodon.org/admin/config/#web_domain

At the time of this post, it reads, in part:

WEB_DOMAIN is an optional environment variable allowing to install Mastodon on one domain, while having the users’ handles on a different domain, e.g. addressing users as @alice@example.com but accessing Mastodon on mastodon.example.com. This may be useful if your domain name is already used for a different website but you still want to use it as a Mastodon identifier because it looks better or shorter.

For an example of webfinger on my own handle, daniel@danielnorton.com, see my server at https://danielnorton.com/.well-known/webfinger?resource=acct:daniel@danielnorton.com

vidarh commented 1 year ago

Just affected by this as well, and I'd suggest that if nobody wants to add webfinger support, at least consider adding an explanatory note.