You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building a federated personal web site where there is no concept of users (there is only one person, who owns the site). Therefore, the addressing system is just @domain, not user@domain.
Since Mastodon uses WebFinger, I have to pretend that there’s a “user” there. As I want to be able to federate with systems that Mastodon that are multi-tenant and yet I also want people to be able to address me with my domain alone (e.g., @ar.al instead of @aral@ar.al), the convention on our system will be that, for federation with multi-tenant services, the “username” will be set to the domain.
(My preferredUsername in the Actor object is also the domain.)
This works initially and Mastodon is able to follow my account (I get follow and unfollow activities properly). It also works intuitively with autocompletion when I’m writing a toot (so I can start typing @domain and my account is found).
However:
The toot does not get sent (tested with a direct message).
When I look at the composed toot, the name is not clickable and neither is it truncated to just the “username” (I see the full @domain@domain displayed in the toot.)
@Gargron Thoughts? This is pretty crucial for what I’m building :)
I searched or browsed the repo’s other issues to ensure this is not a duplicate.
Mastodon currently does not have support for this, I think you're hitting a small snag in an assumption:
preferredUsername, on Mastodon instances, is in the format /\A[a-z0-9_]+\z/i. While this isn't enforced for remote instances, the regex used to determine mentions basically does enforce it: /@(([a-z0-9_]+)(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i
I'm assuming that this is why mentions aren't recognized as one, and why DMs aren't federated.
Sidenote: I'm wondering if using the domain as preferredUsername is the best thing to do, tbh. After all, not everyone will have access to a novelty domain, and e.g. I prefer just @puckipedia over e.g. @puckipedia.com. However: I do feel that the mention regex might have to be loosened up a bit, to allow for this situation to occur. I am actually slightly surprised that full stops aren't in the regex already...
I am building a federated personal web site where there is no concept of users (there is only one person, who owns the site). Therefore, the addressing system is just
@domain
, notuser@domain
.Since Mastodon uses WebFinger, I have to pretend that there’s a “user” there. As I want to be able to federate with systems that Mastodon that are multi-tenant and yet I also want people to be able to address me with my domain alone (e.g.,
@ar.al
instead of@aral@ar.al
), the convention on our system will be that, for federation with multi-tenant services, the “username” will be set to the domain.So, in my WebFinger link, I’m returning:
(Where
${domain}
is the domain – e.g., ar.al)(My preferredUsername in the Actor object is also the domain.)
This works initially and Mastodon is able to follow my account (I get follow and unfollow activities properly). It also works intuitively with autocompletion when I’m writing a toot (so I can start typing
@domain
and my account is found).However:
@domain@domain
displayed in the toot.)@Gargron Thoughts? This is pretty crucial for what I’m building :)
The text was updated successfully, but these errors were encountered: