It seems to me the basic ActivityPub specification is written from the perspective of Mastodon and Twitter-like fediverse instances.
I assume Lemmy and kbin did extend this with some more objects or at least agreed how to use the existing objects and activities there to model a link aggregator with comments on top of that.
Is there some sort of specification or design document about this somewhere? All I found when googling were some old links that resulted in a 404 and the current Lemmy documentation seems more focussed on users, admins and developers and less on the protocol side of things.
First, it’s worth noting that ActivityPub is built on ActivityStreams which is in turn built on ActivityVocabulary. It is necessary to read all of these to have a full understanding of what the stuff in AP actually means. It is also worth reading up on LDN and JSON-LD as those are also used in the spec.
I think you are right in AP being a bit more oriented toward social media in the vein of twitter or facebook and less like reddit, but really a lot of it comes down to how an AP implementing server interprets the objects it receives. I’m not sure if anywhere near this level of customization would be possible if everything spoke pure AP (which does have a client-server interface, not just a server-server federation interface) rather than your clients interacting with bespoke “lemmy” or “mastodon” or whatever APIs.
As far as lemmy goes I think they may have extended the objects a little, as there is a lemmy NS included in results, which is what most implementations including big ones like Mastodon do to introduce new fields (such as content warnings in the case of Mastodon) to things like a Note. Lemmy adds info like
postingRestrictedToMods
,matrixUserId
, andmoderators
.As far as objects:
audience
of the community and anattributedTo
of your user (to
the community and special public endpoint).inReplyTo
its parent (post or comment), to the special public endpoint and CCing the author of the parent and the community.As far as actions, I am less sure because it is less easy to inspect without reading the lemmy code or setting up something to get federated to, but AFAICT:
Thanks, that was very helpful. I was basically hoping to find a document that covered the second half of your comment.
I don’t have any concrete plans to work on Lemmy so far but I was thinking about the possibility of tags for posts (especially but not only NSFW ones) and filters that work on those tags. Of course if you can rely on the author to tag everything that would probably just be some new extension to the post object but I was considering the option of something similar to the tag systems on adult image or story hosting sistes or Steam where third parties can add, modify or remove tags/metadata about the content in some way too.
It sounds to me as if something like that would probably be modelled similar to top-level comments in the AP ecosystem (but of course displayed and used differently).
With the specific concern/idea you are talking about, I have suggested the use of a system like (or just ripping-off wholesale) the Mastodon Content Warning system in a discussion where someone was advocating a “porn” tag in addition to the NSFW one, which I thought was not going to be flexible enough.