ActivityPub/Primer/Add activity

From W3C Wiki

An Add activity is used to add an object to a collection.

ActivityPub API

The Add activity type can add an object to a collection.

Typically, only the creator of the collection can add objects to it. However, an actor may add objects from other authors to their own collection.

It's not possible to specify where in the collection the object will be added.

However, many implementations will use a LIFO format; the most recently-added object is the first in the collection.

ActivityPub protocol

The Add activity type can add an object to a collection.

However, most collections are only editable by the creator. (However, see https://codeberg.org/fediverse/fep/src/branch/main/fep/400e/fep-400e.md for a mechanism for defining publicly-editable collections.)

Therefore, Add activities will usually be received only for collections owned by other actors on other servers. Therefore, there is not much to be done with an Add activity when it is received.

If the receiving server is keeping a cached version of the remote collection, it has two possible actions to take when an Add is received:

  • It can update the cached version of the collection. However, it may not have the correct ordering, since the ordering of new items in collections is not well-defined.
  • It can invalidate the cached version, and re-fetch it from originating server if it is requested in the future.