Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.11k stars 1.51k forks source link

Social networks field on user profiles #5947

Open JohnXLivingston opened 1 year ago

JohnXLivingston commented 1 year ago

Describe the problem to be solved

As said in https://github.com/Chocobozzz/PeerTube/issues/5429 , Mastodon can mark a link in user profiles as verified if the distant page point to the user profile with a "a" tag having a rel="me" attribute. This is very usefull to authenticate users on the fedivers.

Peertube users should be able to add one or many links to their websites and social networks. These links would be shown on the user's page, and could be used to verify links on Mastodon-like profiles. They would also be added to the AP user informations.

Peertube could also implement the same verifying procedure (check that the remote page has a link to the user profile, with rel="me").

Describe the solution you would like

In your account options, their would be a given number of fields to add external links. Such field could be doubled with a description field where the user could add a label to the link.

On the user's profile, these links would be shown, with a rel="me" attribute.

Note: Mastodon does not render the Javascript when verifying remote links. So Peertube should also add these links in the backend generated DOM when accessing a user's page.

FediVideos commented 1 year ago

Just had user request this via FediTips, they have linked to their PeerTube account and would like it to turn green on their Mastodon account. Would be great if there was some kind of dedicated part of the PeerTube profile that includes rel=me

DarthChillash commented 2 months ago

I have been wrecking my brain over this. Please implement if you can.

markwyner commented 1 month ago

Please, please, fix this. In a PeerTube profile you can use the rel="me" attribute. However, PeerTube automatically overrides this by adding two additional classes.

In my profile, for example, I use the following:

<a href="https://mas.to/@markwyner" rel="me">Mastodon</a>

But it renders like this in the PeerTube UI:

<a href="https://mas.to/@markwyner" rel="me noopener noreferrer" target="_blank">Mastodon</a>

The "noopener" and "noreferrer" classes render the rel attribute moot, as Mastodon won't read it. I'd love to see this behavior remedied.

Thanks so much!

Chocobozzz commented 1 month ago

@markwyner Is it not a Mastodon issue? I think it should be able to understand that one of the rel attribute is me

DarthChillash commented 1 month ago

Mark is mistaken. When we put rel="me" attribute in our channel description it's not actually visible from source. For example do a wget https://tux-edu.tv/c/lxr/ and examine it. There is no mention of this attribute, but if you inspect my page with F12 tools in a web browser then you will see where the attribute is.

I think this is where the challenge lies.

EDIT: Perhaps Mastodons' attribute verification cannot handle JavaScript. And without JavaScript the PeerTube page does not load at all.