How do you use `context` (if at all)?

One thing to mention about context is that there are a few somewhat open questions about its usage:

  • Does it contain objects or activities?
  • If it contains activities, does it contain Creates or also other activities (Like, Announce, etc)?
  • What is the ordering?

These kinds of questions are rather freeform because it’s somewhat up to implementers to make a decision about that.

I personally think it should be just the objects, as I’m not convinced it’s particularly important to have a complete backfilled view of every single like and share, or being able to construct an edit log with every single Create/Update. From the point of view of a casual consumer, that information can be lazy-loaded through checking the likes or shares collection; an optimization would be for the producer to partially embed a representation of those collections with a totalItems and maybe the first page, in order to support a “x, y, and 8 others liked this post” type of UX. But this is a matter of preference; “object or activity” is a longer-standing philosophical debate, as much as is “what makes a conversation”. For the maintainer of a context, it might make sense to say “be prepared to support heterogeneous collections of both objects and activities”, as the sender might attach the context to the object, the activity, or both. In theory, if you receive a Create Note with context attached to both, you might expect that both of them will be contained in the (implicit) grouping. But for maintaining an explicit collection, you kind of get to choose how to go about that. Again, I’m a little wary of placing mandates and restrictions on this, in fear of getting it "wrong* and shutting the door on some implementers.

I also think the ordering should be forward chronological instead of reverse chronological, but this is part of a larger issue with collections ordering and paging: Stricter specifications for pagination of Collections and OrderedCollections (btw, the assertion that “every OrderedCollection MUST be reverse chronological” has been somewhat recently clarified/relaxed to only the ones introduced in activitypub as OrderedCollection) – the ideal would be to be able to, as a consumer, request the collection with parameters for ordering, page size, and start index. But failing that, we could just fall back to a similar requirement of reverse chronology… although I dislike and hesitate to enforce this as a MUST. (The ship may have already sailed for this, but I likewise wish/think that the activitypub OrderedCollections were forward chronological instead of reverse chronological. there’s something conceptually backwards about the whole thing.)

1 Like