gugray / rss-parrot

Notifies Mastodon accounts about new posts in the RSS feeds they follow
https://rss-parrot.net
MIT License
109 stars 7 forks source link

Allow verification via //link[@rel='me'] in feed's website link #16

Open colindean opened 7 months ago

colindean commented 7 months ago

Thanks for building this, it's great!

I've got the feed available at https://codeandsupply.co/jobs birb'd via @codeandsupply.co.jobs@rss-parrot.net. I've added //link[@rel='me'] tags to the site to indicate that RSS-parrot's profile is verified, like how other Mastodon and fediverse systems allow.

<link href='https://rss-parrot.net/@codeandsupply.co.jobs' rel='me'>
<link href='https://rss-parrot.net/web/feeds/codeandsupply.co.jobs' rel='me'>

It doesn't look like RSS-parrot supports this right now. It'd be cool if it did.

gugray commented 7 months ago

I'm not familiar with //link[@rel='me'] tags... I'm very green when it comes to the whole ActivityPub universe! What would be the expected behavior if this tag is present? (It's in the feed XML, right?)

colindean commented 7 months ago

The ideal behavior is that the service returning a Website link in a profile has verified that the HTML at the URL contains a <link rel="me" href="${activitypub_url}"/> tag where activitypub_url is the URL of the profile page.

That is, if https://rss-parrot.net/u/codeandsupply.co.jobs contains

{
    "@context": [
        "https://www.w3.org/ns/activitystreams",
        "https://w3id.org/security/v1"
    ],
        "…",
        "attachment": [
        {
            "type": "PropertyValue",
            "name": "Website",
            "value": "<a href='https://codeandsupply.co/jobs' target='_blank' rel='nofollow noopener noreferrer me' translate='no'>https://codeandsupply.co/jobs</a>"
        }
    ]
}

then the HTML or HTTP headers returned in https://codeandsupply.co/jobs need to point back to the profile URL in some way, e.g. one of these:

<link href='https://rss-parrot.net/@codeandsupply.co.jobs' rel='me'>
<link href='https://rss-parrot.net/web/feeds/codeandsupply.co.jobs' rel='me'>
<link href='https://rss-parrot.net/u/codeandsupply.co.jobs' rel='me'>

and then you can show something on the page that indicates that the target link has been verified.

colindean commented 7 months ago

To be more specific, this would actually be visible on https://rss-parrot.net/web/feeds/codeandsupply.co.jobs as something like this mockup:

image

with this simple HTML:

<p
  <span class="label">Site URL: </span>
  <a href="https://codeandsupply.co/jobs">codeandsupply.co/jobs</a>
  <span class="verified" title="verified through link tags">✅</span>
</p>
gugray commented 7 months ago

Got it, thanks! Tagging this as an improvement for later.