Adding federation support to Discourse

I just found this in my inbox:

{
  "@context": "https://www.w3.org/ns/activitystreams",
  "actor": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "followers": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a/followers",
    "icon": {
      "mediaType": "image/png",
      "type": "Image",
      "url": "https://socialhub.activitypub.rocks/uploads/default/original/1X/8faac84234dc73d074dadaa2bcf24dc746b8647f.png"
    },
    "id": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a",
    "inbox": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a/inbox",
    "name": "Fediverse Enhancement Proposals",
    "outbox": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a/outbox",
    "preferredUsername": "feps",
    "publicKey": {
      "id": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a#main-key",
      "owner": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a",
      "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwNTaKKVfQhJhlLIDDjW2\nQgDp3sIQPUa7aUB2UY5Z5esiNNew6wR0oBN7QpEHdM3nbnJ8hV2qzOY5dZaegaeb\nM4aUBZfuWsfUzfSJRt9FTpf2MGami5lGZs0MMww6les0Meq8bNNdeIZujJ9nItcu\nXqpaU36DH8FMUbCRdELR3TxdXgbOm6TE9A7B+om05YPE5eRbMK6k1nXWfVDgTzMg\nx5jLHRhE/KOJkSPT6rWAt0SqaqMbOHuS2osGhxNTdLeuqY1nFptvqGcceDv2LhzR\n4kHrrI6rYPgTQa5dd1JbOgQpIE0UxncnppaXofJFodj2Z7YO+2RGMPqaua4L2SIV\npwIDAQAB\n-----END PUBLIC KEY-----\n"
    },
    "type": "Group",
    "updated": "2023-06-01T13:19:32Z",
    "url": "https://socialhub.activitypub.rocks/c/standards/fep/54"
  },
  "audience": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a",
  "cc": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "https://socialhub.activitypub.rocks/ap/activity/6de1505cda7a63e4aff6ec46031314a7",
  "object": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "attributedTo": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a",
    "audience": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a",
    "content": "Hello!\nThis is a discussion thread for the proposed <a href=\"https://codeberg.org/fediverse/fep/src/branch/main/fep/7502/fep-7502.md\">FEP-7502: Limiting visibility to authenticated actors</a>.\nPlease use this thread to discuss the proposed FEP and any potential problems\nor improvements that can be addressed.\nSummary\nSome servers require authentication for all requests made via ActivityPub, even for GET requests on public objects addressed to as:Public. This violates the requirement that anything&hellip;<br><br><a href=\"https://socialhub.activitypub.rocks/t/fep-7502-limiting-visibility-to-authenticated-actors/3784/1\">↪ SocialHub</a>",
    "id": "https://socialhub.activitypub.rocks/ap/object/79ae9114aabe5fd8a26eedb927edc291",
    "name": "FEP-7502: Limiting visibility to authenticated actors",
    "published": "2023-12-24T19:15:19Z",
    "type": "Note",
    "updated": "2023-12-24T19:15:19Z",
    "url": "https://socialhub.activitypub.rocks/t/fep-7502-limiting-visibility-to-authenticated-actors/3784/1"
  },
  "published": "2023-12-24T19:15:15Z",
  "to": "https://socialhub.activitypub.rocks/ap/actor/bcde488169a4ac803695493219aece2a",
  "type": "Create",
  "updated": "2023-12-24T19:15:15Z"
}

The activity has to and cc fields (and addressed to https://www.w3.org/ns/activitystreams#Public), but the embedded Note object doesn’t have them. This could be the reason why some servers reject this activity.

Here’s what ActivityPub spec says on that matter:

A mismatch between addressing of the Create activity and its object is likely to lead to confusion. As such, a server SHOULD copy any recipients of the Create activity to its object upon initial distribution, and likewise with copying recipients from the object to the wrapping Create activity.

4 Likes