importantimport / hatsu

🩵 Self-hosted & Fully-automated ActivityPub Bridge for Static Sites.
https://hatsu.cli.rs
GNU Affero General Public License v3.0
107 stars 2 forks source link

Implement FEP-4adb, FEP-2c59 #15

Closed kwaa closed 1 month ago

kwaa commented 4 months ago

https://codeberg.org/fediverse/fep/src/branch/main/fep/4adb/fep-4adb.md

kwaa commented 4 months ago

I think the default should be acct:example.com@example.com.

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "xrd": "http://docs.oasis-open.org/ns/xri/xrd-1.0#",
      "aliases": {
        "@id": "xrd:Alias",
        "@type": "@id",
        "@container": "@list"
      },
    }
  ],
  "id": "https://hatsu.local/users/example.com",
  "preferredUsername": "example.com",
  "aliases": ["acct:example.com@example.com", "acct:example.com@hatsu.local"],
  ...
}
kwaa commented 4 months ago

User customization via HTML Meta is also supported. Perhaps a documentation page should be added?

Since it has little to do with the HTML, I prefer to add it to the JSON Feed Extension.

<!-- "aliases": ["acct:i@example.com", "acct:example.com@hatsu.local"] -->
<meta name="hatsu-aliases" content="i" />

or add it to the JSON Feed Extension:

{
  "_hatsu": {
    "about": "https://github.com/importantimport/hatsu/issues/1",
    "aliases": "i"
  },
  ...
}
kwaa commented 4 months ago

FEP-4adb has been implemented and I expect to support customization and close this issue in v0.2.0.

kwaa commented 4 months ago

Notably, it is currently in conflict with FEP-ef61.

kwaa commented 4 months ago

I now prefer to use _hatsu.aliases to be more intuitive.

{
  "_hatsu": {
    "about": "https://github.com/importantimport/hatsu/issues/1",
    "aliases": "i"
  },
  ...
}

This results in the following output:

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",  // AS2
    "https://w3id.org/security/v1",  // security
    "https://purl.archive.org/socialweb/webfinger", // FEP-2c59
    {  // FEP-4adb
      "xrd": "http://docs.oasis-open.org/ns/xri/xrd-1.0#",
      "aliases": {
        "@id": "xrd:Alias",
        "@type": "@id",
        "@container": "@list"
      },
    }
  ],
  "id": "https://hatsu.local/users/example.com",
  "preferredUsername": "example.com",
  "aliases": ["acct:i@example.com", "acct:example.com@hatsu.local"],
  "webfinger": "acct:i@example.com",
  ...
}