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.

  • terribleplan@lemmy.nrd.li
    link
    fedilink
    English
    arrow-up
    3
    ·
    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.
    • taladarOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      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).

        • taladarOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          I was mostly concerned with the fact that most types of porn and other NSFW content are probably of the type that some people will seek out and some people are indifferent to and some people absolutely don’t want to see. So some sort of simple labelling with a warning would probably not work so well.

          My idea was that it would probably make the most sense to label posts with their content in some sort of machine-readable way and then allow users, communities, instances,… to express the content they want at all (or don’t want) via some sort of system of filter rules. This would also have the advantage that the same tags could be used to search for content people do want. Maybe communities or instances could even express requirements for content posted there in the same form as the filter rules for content they want to avoid.

          The problem would of course be quality of tags if you have a complex tagging system and rely solely on the author for tagging. That is how I arrived at the idea of letting third parties add tags, similar to e.g. sites like e-hentai.org or image hosting sites like rule34.xxx (both obviously NSFW) where third parties can add information on language, author, art style, characters, kinks,…

          Outside the porn focus one could have similar tags for news about a specific country or company or website (e.g. news about reddit or twitter) or political party or NGO or movie franchise or show or fictional universe, for the whole set of pet attributes and actions reddit modelled by having hundreds of cat related subreddits,

          Of course something like that would likely require one of those tuple tag systems (language:english,artstyle:rendered,…). Possibly even something more complicated depending on the possible use-cases for filters.