Webfinger in Fedify should support Mastodon's special `rel= 'http://ostatus.org/schema/1.0/subscribe'` and `template`
When you webfinger an account on a Mastodon instance, you get a list of links, one of them has a template:
{
"subject":"acct:[email protected]",
"aliases":["https://mastodon.social/@sundogplanets","https://mastodon.social/users/sundogplanets"],
"links":[
{"rel":"http://webfinger.net/rel/profile-page","type":"text/html","href":"https://mastodon.social/@sundogplanets"},
{"rel":"self","type":"application/activity+json","href":"https://mastodon.social/users/sundogplanets"},
{"rel":"http://ostatus.org/schema/1.0/subscribe","template":"https://mastodon.social/authorize_interaction?uri={uri}"},
{"rel":"http://webfinger.net/rel/avatar","type":"image/jpeg","href":"https://files.mastodon.social/accounts/avatars/108/194/428/751/240/116/original/f1eb397ab1659575.jpeg"}
]
}
The link with the template can be used to simplify a federated follow request. When you replace the {uri} parameter in the string by a Fediverse handle like username@domain, the link redirects you to their profile page as seen from the perspective of the other Mastodon server, e.g. mastodon.social in this case.
On that mirrored profile page, you can simply click the Follow button, and you're done.
I wanted to make this work with Fedify so that other people can easily follow me on my app, but I couldn't figure out how to add such a template-based URL to the urls collection of my actor object, so that Fedify's webfinger endpoint would show it.
The problem was that the Link class in the vocabulary does not support the (Mastodon-only) template field. Could you add this in Fedify, as a non-standard feature?
You can see a good application of this mechanism in Guppe: https://github.com/immers-space/guppe/blob/7d44a6df88a4a60e05ad6360aac6835e291b0ced/web/src/views/Profile.vue#L88
Guppe supports this "reverse follow" to make it easy to follow a gup.pe group. It would be great if Fedify-based apps would support this out of the box.
Does this all make sense? 😀
In fact, I've been working on a feature that would allow you to customize WebFinger responses, but it won't happen anytime soon.
I'll work on this. This is related to https://github.com/fedify-dev/botkit/pull/14.
Wow, thanks for adding this! Will try it soon!
It will be shipped with the next minor release, v1.9.0!