10

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.

top 5 comments
sorted by: hot top controversial new old
[-] terribleplan@lemmy.nrd.li 4 points 1 year ago

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, and moderators.

As far as objects:

  • A community is a Group.
  • A post is a Page with an audience of the community and an attributedTo of your user (to the community and special public endpoint).
  • A comment is a Note that is 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:

  • Upvotes and downvotes are Like and Dislike
  • Create is used when you as a user want to make a post in a community
  • Announce is used when a post actually gets made in a community
  • I think Announce is used for other things and might explain some of how comments work as well, as a post seems to live on the community instance but a comment seems to live on your instance.
[-] taladar@sh.itjust.works 1 points 1 year ago

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).

[-] terribleplan@lemmy.nrd.li 1 points 1 year ago

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.

[-] pe1uca@lemmy.pe1uca.dev 2 points 1 year ago

I don't know if this is kind of what you're looking for since I haven't read it completely yet.

https://socialhub.activitypub.rocks/pub/guide-for-new-activitypub-implementers

[-] RoundSparrow@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

I've been digging around for similar, but haven't had much luck. I posted a few conversations I found on the topic in !lemmyfederation@lemmy.ml

load more comments
view more: next ›
this post was submitted on 29 Jun 2023
10 points (100.0% liked)

Lemmy Support

4550 readers
11 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS