ActivityPub
Manyfold does not yet include ActivityPub federation, or even multiuser support. This document is a proposal for comment, which explores how Manyfold instances might interact with the Fediverse in future. Feedback is welcome; please comment on the GitHub issue with your thoughts!
Manyfold instances should use the ActivityPub protocol to exchange user activity with other instances, and other ActivityPub services, such as Mastodon.
On top of the ActivityPub standard object types, we define an extension specifically for 3D content, and provide a mapping back to the standard for use when communicating to instances that don’t support them.
NodeInfo
Manyfold will support the NodeInfo standard for exposing server capabilities.
Support for extension types will be indicated in the metadata
field of the nodeinfo response. Several metadata fields are known, but we define a new one specifically to indicate 3d model support.
{
"version": "2.1",
"software": {
"name": "manyfold",
"version": "x.y.z"
},
"protocols": [
"activitypub"
],
"usage": {...},
"openRegistrations": true|false,
"metadata": {
"activitypub": {
"extensions": [
"https://w3id.org/activity-streams/extensions/3dModel#v1.0"
]
}
}
}
Platforms such as Pixelfed and Bookwyrm use the software
field to determine support for their custom types, but as we explicitly want to encourage other implementations, using a structure in metadata
seems more sensible. We define an IRI for the extension type, as proposed in FEP-6481.
Objects
3dModel
3dModel
is a custom ActivityStreams object type, corresponding to Manyfold’s internal Model
class. It extends the Document
core object type, in the same way as Audio
in the core spec.
If available, the preview
property of the object will include a URL for both an image and a 3d model file for direct loading by the client, with the appropriate MIME types. Of course, it’s up to the client whether it chooses to display these.
Downgrading
Servers that do not support the 3dModel
object type (as determined using NodeInfo, above) will be sent a Link
instead, containing the canonical URL of the model’s web page, and the 3D preview will not be included.
Actor
Our Actor
objects are just as defined in the ActivityPub standard; they correspond to our signed-up users, and will use the Person
type.
Note that Manyfold’s internalCreator
class is not the same thing; Manyfold can store creator metadata even when the creators do not have an account on the instance. Only activities from actual real users of an instance are federated; creators that are purely made for metadata purposes will not be exposed.
Collection
We will use the ActivityPub standard Collection
object to share activities where users add 3dModel
s and Actor
s to collections, if made public. This will operate using all the standard semantics.
Note
Note
is used to represent comments on a model; these could either be local to Manyfold, or remote on a different system such as Mastodon. A Manyfold Note
will always be in reply to something, either a 3dModel
or another Note
. They operate in accordance with the standard.
Activities
The following activities are supported on the object types shown in the table. In summary:
- Following is supported for users, individual models, and collections;
- Standard microblog-interaction-type activities (create, like, boost) are supported for models and comments;
- Collection-oriented activities are supported for users, models, and other collections.
Activity | Description | object | target | origin |
---|---|---|---|---|
Create | Actor has published a new model or comment | 3dModel , Note | ||
Update | Actor has updated the object (including individual files, in the case of a model) | 3dModel , Note | ||
Delete | Actor has deleted the object | 3dModel , Note | ||
Announce | Actor “boosts” the object into their own timeline | 3dModel , Note | ||
Like | Actor has liked the object | 3dModel , Note | ||
Flag | Actor has flagged the object for moderator attention | 3dModel , Note | ||
Follow | Actor has followed the object to get updates | Actor , 3dModel , Collection | ||
Add | Actor has added the object to the target collection | Actor , 3dModel , Collection | Collection | |
Remove | Actor has removed the object from the target collection | Actor , 3dModel , Collection | Collection |
Technical implementation
Manyfold’s ActivityPub support will be built using the federails Ruby gem.
Many thanks to Bookwyrm and Pixelfed for their excellent ActivityPub implementation docs, which this page is heavily based on.