How the content of a “post” gets federated has arisen in a few contexts. I’m creating this topic to collect some thoughts on it. I’ve also wikified this topic so different implementers in the threadiverse can add their current implementation.
Discourse
An actor with publication capabilities (e.g. a category) can federate posts as a Note or an Article. This is configurable via a setting. When federating a Note there is a maximum character length, configurable by setting, which defaults to 500 characters. The section of a post that is federated as a Note can be selected by the user using bbcode [note][/note]
. When federating an Article the entire content of a post is sent.
Example Create > Note
id: https://angus.ngrok.io/ap/activity/64912a54588bcdcaf1c1731960f5a460
type: Create
audience: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a
to: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a
cc:
- https://www.w3.org/ns/activitystreams#Public
published: '2024-04-15T12:02:35Z'
updated: '2024-04-15T12:02:35Z'
actor:
id: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a
type: Group
updated: '2024-03-15T13:17:56Z'
url: https://angus.ngrok.io/c/general/4
name: General
inbox: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a/inbox
outbox: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a/outbox
followers: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a/followers
preferredUsername: general
publicKey:
id: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a#main-key
owner: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a
publicKeyPem: |
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoz6w29Q529DYn0GojPAE
HjYjGzgH5aDTs9/8kjBRoCTC7mc1z7/er7jwfyhS29twHvq03eusSuhWOCfCjVLV
gJGP50oXHDObKdLRsH4XB9ygiTj0+KMIcWr2JRJN/KM0XysfmjdkcAy1KzH89YVd
pQEVDoWPIAQ5LpwXgos41cLWbYlBsg/9jor32JZ6wHsfD1iU75haf6q0y0N7mxZi
U2DGVb9liuLAWqkO/z3hRjKv12CqPTuqG5DyUcV9a/VK2i17h2cZ1dWIkts9QH0C
tGGf4gGspZm4auL4QvrzCz05mOCc3vJ36phvZgb6JVuoMsTDRfs0wZ1/5kwN+FK6
KQIDAQAB
-----END PUBLIC KEY-----
icon:
type: Image
mediaType: image/png
url: http://localhost:3000/images/discourse-logo-sketch-small.png
"@context": https://www.w3.org/ns/activitystreams
"@context": https://www.w3.org/ns/activitystreams
object:
id: https://angus.ngrok.io/ap/object/e9b5e3f77f77259407c3542c4d04d898
type: Note
audience: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a
to: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a
cc:
- https://www.w3.org/ns/activitystreams#Public
published: '2024-04-15T12:02:35Z'
updated: '2024-04-15T12:02:36Z'
url: https://angus.ngrok.io/t/this-is-a-topic-that-will-federate-a-note/87/1
attributedTo: https://angus.ngrok.io/ap/actor/6a0f2575a9d301173a45f3619b15656a
name: This is a topic that will federate a Note
content: "<p>This is the content of the Note with a limit of 500 characters.</p>"
"@context": https://www.w3.org/ns/activitystreams
Create > Article
is exactly the same, as Create > Note
besides:
- The
content
will be the entire post (without limits) - The
type
of the object will beArticle
.
NodeBB
NodeBB uses “topics” that contain “posts”. A topic is merely a shell and contains (among other things) the id and title, but the “meat” is contained in posts. OP is a post, replies are posts.
NodeBB currently federates everything (including OP) out as Note
, with no character limits. It will also send the raw markdown in source.content
, but content
might be additionally parsed by other filters and plugins (e.g. emoji, rich previews, etc.)
NodeBB may in the future also federate out an Article with the initial topic creation. Waiting for movement from WG before proceeding.
Lemmy
Lemmy simply federates the full text as Page
.