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.

  • freamon@endlesstalk.orgOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    11 months ago

    For an example of an Announce encapsulating these, I’ll use this post. The format is always the same from what I’ve seen (the ‘context’ is moved to the top level, and the original activity is placed inside as an ‘object’).

    curl --header 'accept: application/activity+json' https://lemmy.ml/c/learningrustandlemmy/outbox | jq .orderedItems[3]

    {
      "actor": "https://lemmy.ml/c/learningrustandlemmy",
      "to": [
        "https://www.w3.org/ns/activitystreams#Public"
      ],
      "object": {
        "id": "https://lemmy.ml/activities/create/191df452-33a6-4861-8218-6f1702f39fe3",
        "actor": "https://endlesstalk.org/u/freamon",
        "to": [
          "https://www.w3.org/ns/activitystreams#Public"
        ],
        "object": {
          "type": "Page",
          "id": "https://endlesstalk.org/post/22923810",
          "attributedTo": "https://endlesstalk.org/u/freamon",
          "to": [
            "https://lemmy.ml/c/learningrustandlemmy",
            "https://www.w3.org/ns/activitystreams#Public"
          ],
          "name": "Lemmy's ActivityPub activities",
          "cc": [],
          "content": "<p>I’ll reply in the comments with a example of what lemmy sends for each thing you can do (I think I’ve t                                                                                                                                     hought of everything, but you can probably guess the format if not, or I can always add it).</p>\n<p>So, the setup for these                                                                                                                                      is:<br />\nOur instance is called ‘local.com’<br />\nOur user is called ‘freamon’<br />\nThe other instance is called ‘remo                                                                                                                                     te.com’<br />\nThe community on that instance is called ‘interesting’</p>\n<p>For many of these, remote.com will receive the                                                                                                                                     m, 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.</p>\n",
          "mediaType": "text/html",
          "source": {
            "content": "I'll reply in the comments with a example of what lemmy sends for each thing you can do (I think I've th                                                                                                                                     ought of everything, but you can probably guess the format if not, or I can always add it).\n\nSo, the setup for these is:                                                                                                                                          \nOur instance is called 'local.com'          \nOur user is called 'freamon'         \nThe other instance is called 'remo                                                                                                                                     te.com'     \nThe community on that instance is called 'interesting'          \n\nFor 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 stay                                                                                                                                     s in sync.\n",
            "mediaType": "text/markdown"
          },
          "attachment": [],
          "commentsEnabled": true,
          "sensitive": false,
          "published": "2024-02-15T12:08:08.036884Z",
          "updated": "2024-02-15T12:42:34.861055Z",
          "language": {
            "identifier": "en",
            "name": "English"
          },
          "audience": "https://lemmy.ml/c/learningrustandlemmy"
        },
        "cc": [
          "https://lemmy.ml/c/learningrustandlemmy"
        ],
        "type": "Create",
        "audience": "https://lemmy.ml/c/learningrustandlemmy"
      },
      "cc": [
        "https://lemmy.ml/c/learningrustandlemmy/followers"
      ],
      "type": "Announce",
      "id": "https://lemmy.ml/activities/announce/create/6689f68f-1fc4-44d2-9d0a-0e200d469e48"
    }