Skip to content

Conversation

nud
Copy link
Contributor

@nud nud commented Dec 29, 2022

We add a <link rel="me" href="https://mastodon.example/@me"> URL in the <head> when the user configures their Mastodon URL.

We only accept URLs (not @[email protected]-style identifiers) for the sake of simplicity, because it's both the most universal format and the one required for the "verification" feature. A placeholder is used to convey that fact.

For the record, at this time Mastodon requires a <a> or <link> element with rel="me" and an href attribute pointing to the https:// URL of the Mastodon account. I opted for the <link> element because it didn't involve modifying the web interface any further. See https://docs.joinmastodon.org/user/profile/#verification for details.

https://linuxfr.org/suivi/faire-valider-sa-page-perso-linuxfr-org-sur-mastodon

I also fixed the formatting of command lines in Docker.md while I was at it.

Updated options

image

<head>

image

@Trim
Copy link
Member

Trim commented Dec 31, 2022

Thanks for this PR, it's nice.

I've added a comment on the issue report: https://linuxfr.org/suivi/faire-valider-sa-page-perso-linuxfr-org-sur-mastodon#comment-1910962

For the part concerning this pull request, it would be nice to add these two things:

First a string after the Mastodon input saying something like below to discover this functionality.

Après avoir enregisté le lien de votre compte Mastodon, vous pourrez utiliser le lien https://linuxfr.org/users/xxx pour faire vérifier votre identité Mastodon via LinuxFr.

Second a link to the user Mastodon account on each user content as there's already this functionality for personal website and xmpp account:

(site Web personnel, adresse XMPP, compte Mastodon)

It would be nice to discover new Mastodon account to follow.

See this code for the last part:

def posted_by(content, user_link='Anonyme')
user = content.user
user ||= current_user if content.new_record?
if user
user_link = link_to(user.name, "/users/#{user.cached_slug}", rel: 'author')
user_infos = []
user_infos << homesite_link(user)
user_infos << jabber_link(user)
user_infos.compact!
user_link += (" (" + user_infos.join(', ') + ")").html_safe if user_infos.any?
end

@flzara
Copy link

flzara commented Dec 31, 2022

Thanks for this PR, it's nice.

I've added a comment on the issue report: https://linuxfr.org/suivi/faire-valider-sa-page-perso-linuxfr-org-sur-mastodon#comment-1910962

Thanx, I added some comments just below yours: https://linuxfr.org/suivi/faire-valider-sa-page-perso-linuxfr-org-sur-mastodon#comment-1910974

For the part concerning this pull request, it would be nice to add these two things:

First a string after the Mastodon input saying something like below to discover this functionality.

Après avoir enregisté le lien de votre compte Mastodon, vous pourrez utiliser le lien https://linuxfr.org/users/xxx pour faire vérifier votre identité Mastodon via LinuxFr.

May I suggest a little modification at the end :

Après avoir enregisté le lien de votre compte Mastodon, vous pourrez utiliser le lien https://linuxfr.org/users/xxx pour prouver que celui-ci appartient bien au même utilisateur que sur LinuxFr.org.

@nud
Copy link
Contributor Author

nud commented Jan 2, 2023

@Trim:

Second a link to the user Mastodon account on each user content as there's already this functionality for personal website and xmpp account:

I didn't do it on purpose, but I suppose it can be added if you insist.

For the record I'm not sure adding all the links to someone on each comment is the way to go (I suppose having a proper profile page would be better IMO) because if someone adds for e.g. Matrix or Signal support now that XMPP is pretty much dead, will you add these too? Knowing that removing a link (e.g. XMPP) without having people complaining will be pretty much impossible 😉

@nud
Copy link
Contributor Author

nud commented Jan 2, 2023

Obviously I didn't test the actual verification process...

@nud nud force-pushed the suivi-2046-mastodon-url branch from d557333 to d169f6e Compare January 2, 2023 21:13
@nud
Copy link
Contributor Author

nud commented Jan 2, 2023

@Trim @flzara Requested changes have been implemented.

@Trim
Copy link
Member

Trim commented Jan 5, 2023

Obviously I didn't test the actual verification process...

I've checked it with my new mastodon account. It seems to work well.

I've a glitch which hide it after a little moment on my Mastodon instance, but I'm sure it's my fresh Mastodon install which is missing some feature, as it's my first Mastodon install.

These were using "inline code" syntax rather than code block. Code
blocks look better and make the lines easier to cut and paste when
editing the file.
@nud nud force-pushed the suivi-2046-mastodon-url branch from d169f6e to dd92167 Compare January 5, 2023 20:04
@nud
Copy link
Contributor Author

nud commented Jan 5, 2023

I got inspired by @Oumph's latest merged commit and added statistics for Mastodon domains while I was at it.

This commit series talks about Mastodon all over the place but in truth some of it would work with other ActivityPub software (Pleroma comes to mind, but there are lots of others). Although as far as I know the verification process is Mastodon-specific, maybe the wording will need to be adapted if we show that URI in the web interface. I honestly have no idea what the proper word is / will be when the dust settles.

@nud nud requested a review from Trim January 5, 2023 20:31
@nud nud force-pushed the suivi-2046-mastodon-url branch 2 times, most recently from 256c49d to 7b60335 Compare January 5, 2023 21:58
nud added 3 commits January 6, 2023 00:58
We add a `<link rel="me" href="https://mastodon.example/@me">` URL in
the `<head>` when the user configures their Mastodon URL.

We only accept URLs (not `@[email protected]`-style identifiers) for
the sake of simplicity, because it's both the most universal format and
the one required for the "verification" feature. A placeholder is used
to convey that fact.

For the record, at this time Mastodon requires a `<a>` or `<link>`
element with `rel="me"` and an `href` attribute pointing to the
`https://` URL of the Mastodon account. I opted for the `<link>` element
because it didn't involve modifying the web interface any further. See
https://docs.joinmastodon.org/user/profile/#verification for details.

https://linuxfr.org/suivi/faire-valider-sa-page-perso-linuxfr-org-sur-mastodon
We show the Mastodon URL alongside the website URL and XMPP address.
This crowds the user box even more and I think LinuxFR should switch to
using a proper profile page instead.

This was requested by Adrien Dorsaz.
This is mostly cut and paste from commit 3ac001b.
@nud nud force-pushed the suivi-2046-mastodon-url branch from 7b60335 to 0b3b099 Compare January 6, 2023 00:00
@nud
Copy link
Contributor Author

nud commented Jan 6, 2023

In the same spirit as #355 I updated this MR to use the http_url validator. I also changed the field type in preferences to be a "url" field rather than a "text" field (similar to the homesite field)

Copy link
Member

@Trim Trim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the improvements !

@Oumph can merge and publish 👍

PS: I don't worry about the fact we currently only allow https link for Mastodon profile (instead of the user name), because the Mastodon documentation enforces the use the https profile link to verify the profile:

the href attribute on one of those elements is equal to the URL for your Mastodon profile

@Oumph Oumph merged commit a54c715 into linuxfrorg:master Jan 28, 2023
@flzara
Copy link

flzara commented Jan 29, 2023

Merci :)

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.

4 participants