ActivityPub/Primer/Threading

From W3C Wiki

ActivityPub supports threading of conversations.

original post

An original post can be any type of object, even activities or extension object.

However, the most typical types of objects to have a thread include resources such as `Document`, `Page`, `Note`, `Article`, `Image`, `Video`, `Audio`. These are often called "posts".

inReplyTo

It's possible to post a reply to an original post. There is no specified type for a "comment", but these are often represented as a `Note`.

The inReplyTo property marks the reply. It refers to the original post by ID.

In order to let the original post's server track replies, reply posts should address the original author with `to`, `cc`, `bto`, `bcc`, etc. even if not mentioned. (?)

replies

When the server of the original post receives a reply post, it may add that reply post to the original posts `replies` property. This makes it possible to track the thread of a conversation.

The server can receive the reply post as a Create activity with an object that has the inReplyTo property.

The server can receive the reply post either via client-to-server or server-to-server.

There are many reasons a server may not add the reply post, and it's at the author's and server's discretion.

Some reasons not to add the reply:

  • Spam filtering
  • Author is curating replies
  • Author has closed the post to new replies

Note that there is no current standard mechanism for expressing or hinting at these policies in the original post.

conversation tree

It's possible to identify replies to an original post, and replies to its replies, by getting the post's `replies` property, and then following replies properties of each of the objects in the collection.

There is not a standard property used for identifying the conversation tree an object belongs to. Mastodon uses ostatus:conversation. Pleroma uses context.

There is not a standard way to get all the objects that are part of a conversation.

Outside of Create

Tracing conversation threads isn't strictly limited to the processing of the Create activity, and it can happen whenever a server processes a post. This may be due to a Create, an Add, a manual fetch, or other processing where an object is first encountered.