Regarding `replies` and `inReplyTo` traversal

The latest commit to NodeBB's activitypub branch updates the post handler so that the replies property returns either an empty array (i.e. []) if it has no direct replies, or a resolvable URL to a replies collection.

This step completes the two-way traversal options for any given object. Given any object (e.g. an as:Note or otherwise), you can traverse up through parent objects via inReplyTo, and down through child objects via replies.

However, neither of these options are ideal for building out a reliable context around any given object. For a variety of reasons, somewhere along the parent or child chain you could run into issues retrieving the object (outages, timeouts, DNS, etc.), which is problematic when you're hoping to completely traverse a linked list.

What we need is to move past the uni-dimensional movement of inReplyTo/replies, and to the next dimension: the ability to see the entire context at once!

Luckily, one of the ForumWG's goals has been working towards a more reliable implementation using the rather aptly named context property, resolvable to an OrderedCollection. NodeBB already does provide this, Discourse is going to build out this capability, and I am interested in seeing if any other AP impementers are open to building out implementations against it.

Short-to-medium term, we're hoping to draft an FEP to codify this behaviour, but I'd love to see some working implementations first!


It should return a Collection/OrderedCollection with totalItems = 0 and either items or orderedItems being the empty array. AS2-Vocab defines its range as a Collection, not an array.

Relevant FEPs:

As author of both, if anything is missing from these or can be improved, I am open to feedback! Or rather, if you meant drafting a Social CG report, then those can be considered inputs :slight_smile:

@julian nice! I love reading your progress posts. Always excited for new AP implementations and seeing how each dev handles things once it's done.

I'm obviously not a dev myself, but I really admire your work. thanks for the kind words, appreciate it!

I feel like we're almost in an exploratory phase of ActivityPub development, where we're still figuring out some best practices for some things.

It'll only get better!