I’ll reply in the comments with a example of what lemmy sends for each thing you can do (I think I’ve thought of everything, but you can probably guess the format if not, or I can always add it).

So, the setup for these is:
Our instance is called ‘local.com
Our user is called ‘freamon’
The other instance is called ‘remote.com
The community on that instance is called ‘interesting’

For many of these, remote.com will receive them, and rewraps them in an Announce to send out to all the other instances with a copy of the community, so everyone stays in sync.

Sort by ‘Old’ for the best hope of these making sense.
I’ll follow this post up with a script, that can be used to send these activities from the command-line, as I think it can help to understand Lemmy if you’re using something much simpler than Lemmy to do some of things Lemmy does.

EDIT: As nutomic as mentioned, a better list is in the docs. It’s the kind of thing I should read first, I guess.

  • freamonOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    freamon subscribes to the interesting community
    The subscription status changes to ‘pending’

    {
      "@context": [
        "https://join-lemmy.org/context.json",
        "https://www.w3.org/ns/activitystreams"
      ],
      "actor": "https://local.com/u/freamon",
      "to": [
        "https://remote.com/c/interesting"
      ],
      "object": "https://remote.com/c/interesting",
      "type": "Follow",
      "id": "https://local.com/activities/follow/5cc358b8-9eae-49ef-8b5c-05d98504bda1"
    }
    
    • freamonOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      freamon changes his mind. He doesn’t want to subscribe anymore

      {
        "@context": [
          "https://join-lemmy.org/context.json",
          "https://www.w3.org/ns/activitystreams"
        ],
        "actor": "https://local.com/u/freamon",
        "to": [
          "https://remote.com/c/interesting"
        ],
        "object": {
          "actor": "https://local.com/u/freamon",
          "to": [
            "https://remote.com/c/interesting"
          ],
          "object": "https://remote.com/c/interesting",
          "type": "Follow",
          "id": "https://local.com/activities/follow/c934a27e-0dad-4641-85f5-a83e04d672a4"
        },
        "type": "Undo",
        "id": "https://local.com/activities/undo/a9047cfc-ed0e-49c2-86da-9a0b3dbdc463"
      }
      

      Note 1: lemmy expects these ‘id’ fields to be unique, so the encapulated ‘Follow’ isn’t the same as the one that was sent.
      Note 2: lemmy also sends a Undo/Follow if you block a community

    • freamonOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      The interesting community accepts freamon’s subscription request
      The subscription status changes to ‘joined’

      {
        "actor": "https://remote.com/c/interesting",
        "to": "https://local.com/u/freamon",
        "object": {
          "actor": "https://local.com/u/freamon",
          "to": null,
          "object": "https://remote.com/c/interesting",
          "type": "Follow",
          "id": "https://local.com/activities/follow/c66515bd-6f81-44e0-8af9-c4c4ae307051"
        },
        "type": "Accept",
        "id": "https://remote.com/activities/accept/4ca771e6-0213-478a-83ba-d957984b98c5"
      }