FEP-22b6: Linking an ActivityPub Object to a HTML page and back

Hello!

This is a discussion thread for the proposed FEP-22b6: Linking an ActivityPub Object to a HTML page and back.
Please use this thread to discuss the proposed FEP and any potential problems or improvements that can be addressed.

Summary:

Links are a fundamental part of the internet. This FEP describes how to use
links to link a HTML page to an ActivityPub object. The mechanisms described
in this document are not new and are used to link to RSS feeds (see[alternate,
second example).

2 Likes

What does it mean in practice? Am I supposed to parse HTML if a server returns HTML page when ActivityPub object is requested?

Yes. That’s one of the things this FEP enables you to do. The second option is somebody to create a browser extension that provides similar functionality to the RSS icon for ActivityPub:

Mastodon already supports the “get html → parse → get link” behavior:

1 Like

uses a Group as the response to its link element

<link href="https://activitypub.space/category/5" rel="alternate" type="application/activity+json"/>

$ curl https://activitypub.space/category/5 -Haccept:application/activity+json | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1255  100  1255    0     0   2891      0 --:--:-- --:--:-- --:--:--  2891
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1"
  ],
  "id": "https://activitypub.space/category/5",
  "url": "https://activitypub.space/category/5/technical-discussion",
  "inbox": "https://activitypub.space/category/5/inbox",
  "outbox": "https://activitypub.space/category/5/outbox",
  "type": "Group",
  "name": "Technical Discussion",
  "preferredUsername": "technical-discussion",
  "summary": "<p dir=\"auto\">Technical discussion about ActivityPub-related topics.</p>\n",
  "icon": {
    "type": "Image",
    "mediaType": "image/png",
    "url": "https://activitypub.space/assets/uploads/category/category-5-icon.png"
  },
  "publicKey": {
    "id": "https://activitypub.space/category/5#key",
    "owner": "https://activitypub.space/category/5",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3spFZ1ojuGkxmwpEAlbr\n+GW6U88Wgdc8LEWlbwYwwPPBCXVf2cy8v0Hg8Ugjh+x5dqcCxPRrnA6MSe+XMgSj\n6LYL/ne17JUDe3yrQCy+OzTHBMJUYLicdPs9xGjxb0h+xM4U+eoZz3zRNacPDHBB\nTre2x7yMQviCcxbIyCIz+OJNm83idO0VEolgRqFAJhOy1wy4P4o28UjHIHv2WlAu\nwlP4iRh0f1lNIirzFbDSgApFdqWE4EDZsxf4MZQXdi51dEjxc6urZfrt7wMTzldp\nYYQRLKozmFYPk3FDRIpihoiw5Z45I107j7+pe09IBP9EFN5kzS6/ZPTDa6p9UY5e\nKQIDAQAB\n-----END PUBLIC KEY-----\n"
  },
  "endpoints": {
    "sharedInbox": "https://activitypub.space/inbox"
  }
}

I think that is a good choice.

The behavior of Deleting a post vs deleting an entire comment tree | ⁂ ActivityPub.Space is more interesting.

The embedded link leads to Deleting a post vs deleting an entire comment tree | ⁂ ActivityPub.Space, which is the Article.

Whereas if one requests it with applicatoin/activity+json one gets the OrderedCollection.

I have to think about this behavior, and if I like it. I’m unsure if I do.

1 Like