w3c / activitypub

http://w3c.github.io/activitypub/
Other
1.2k stars 77 forks source link

4.1 Actor Objects -> Outbox mandatory #371

Closed greg-kennedy closed 1 year ago

greg-kennedy commented 1 year ago

Actor objects MUST have, in addition to the properties mandated by 3.1 Object Identifiers, the following properties:

inbox A reference to an [ActivityStreams] OrderedCollection comprised of all the messages received by the actor; see 5.2 Inbox. outbox An [ActivityStreams] OrderedCollection comprised of all the messages produced by the actor; see 5.1 Outbox.

This quite clearly states that outbox is mandatory. However, Mastodon (at least, and others in the wild) are able to interact with actors which do not have an outbox endpoint defined. See actor creation in @dariusk's express-activitypub minimal example, which still works for post-only into Mastodon and Pleroma servers, despite not exposing any outbox.

Presumably, this means these implementations are not compliant... yet they still function. Is this a sign that the spec should be updated, and outbox downgraded to SHOULD (or MAY)?

snarfed commented 1 year ago

Good point! My experience has been that outbox isn't used in practice much in S2S, if at all, which is obviously much more widely adopted than C2S.

The one main potential use case is the "warm start" situation: when user A follows user B on a different instance, and that's the first time anyone on A's instance has followed B, then A's instance can fetch historical posts from B's outbox to backfill their profile so it doesn't look empty. I'm not aware of many (if any) S2S implementations that actually do this, though.

evanp commented 1 year ago

It seems that Mastodon, in this case, is being liberal in what it accepts, just as the robustness principle suggests. Especially since it does not use the outbox property for S2S delivery, this makes a lot of sense.

The outbox is absolutely required for C2S, and less important for S2S. That said, it can be very useful for a number of federated situations, like the "warm start" @snarfed suggested, or for "catchup".

I've added documentation to the primer about the use of outbox.

https://www.w3.org/wiki/ActivityPub/Primer/Outbox

I've also added an issue to dariusk/express-activitypub#18 to recommend implementing this required property.