洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm looking for your opinions from the developers of the fediverse.

A common HTML web page can contain related links via the <link> tag. I would like to do the same for Activity Streams objects, for example:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "id": "https://writings.hongminhee.org/ap/2024/12/a-year-with-the-fediverse.json",
  "type": "Article",
  "name": "A year with the fediverse",
  "content": "2024 was truly a year where I was deeply immersed in the fediverse. …",
  "url": "https://writings.hongminhee.org/2024/12/a-year-with-the-fediverse/",
  "attachment": [
    {
      "type": "Link",
      "rel": "alternate",
      "hreflang": "ko",
      "href": "https://writings.hongminhee.org/2024/12/a-year-with-the-fediverse/index.ko-hang-kr.html",
      "mediaType": "text/html"
    },
    {
      "type": "Link",
      "rel": "alternate",
      "hreflang": "ja",
      "href": "https://writings.hongminhee.org/2024/12/a-year-with-the-fediverse/index.ja.html",
      "mediaType": "text/html"
    }
  ]
}

Do you think this makes sense, and would it be appropriate to put Link objects in the attachment?

Chris​‌​‬ Hayes‌​​​'s avatar
Chris​‌​‬ Hayes‌​​​

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

@hongminhee I'm still new to ActivityStreams, but with how attachment is used for "extra data" it seems consistent.

Though, I did find that part a little confusing to learn since "attachment" makes me think of email, and in AS it's more than just files. I do wish there was a formal property specifically for "custom metadata" on an ActivityStream Object.

For this use-case, I would think the LanguageString type would be useful, but I guess mixing that with a URI type would make things messy.

Rimu's avatar
Rimu

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

@hongminhee The SWICG has published this swicg.github.io/activitypub-ht

tldr; use a Link HTTP header

Helge's avatar
Helge

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

These are URLs. They should belong in the url tag. For example peertube does this.

As funfedi.dev shows this is not widely supported. However, the same should be true for attachments.

Evan Prodromou's avatar
Evan Prodromou

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

@hongminhee we've got a task force working on this! Draft here.

swicg.github.io/activitypub-ht