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 replies to his own post, with an inline link to the same image, and an emoji
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/create/c394a258-eac5-4555-8b98-823002cbb88c", "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Note", "id": "https://local.com/comment/1", "attributedTo": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "cc": [ "https://remote.com/c/interesting", "https://local.com/u/freamon" ], "content": "<p>Comment text<br />\n<img src=\"https://i.imgur.com/T7Z3vUU.jpeg\" alt=\"\" /></p>\n<p>😜</p>\n", "inReplyTo": "https://local.com/post/3", "mediaType": "text/html", "source": { "content": "Comment text \n![](https://i.imgur.com/T7Z3vUU.jpeg)\n\n 😜 ", "mediaType": "text/markdown" }, "published": "2024-02-13T21:48:18.776300Z", "tag": [ { "href": "https://local.com/u/freamon", "name": "@[email protected]", "type": "Mention" } ], "distinguished": false, "audience": "https://remote.com/c/interesting" }, "cc": [ "https://remote.com/c/interesting", "https://local.com/u/freamon" ], "tag": [ { "href": "https://local.com/u/freamon", "name": "@[email protected]", "type": "Mention" } ], "type": "Create", "audience": "https://remote.com/c/interesting" }
Note 1: lemmy uses ‘Page’ for a post, and ‘Note’ for a comment, whereas mastodon uses ‘Note’ for both, with ‘inReplyTo’ distinguishing between the two.
Note 2: this is sent to the main community at remote.com, and also to the post’s author (it would appear in his inbox if they weren’t the same person)
freamon regrets his comment, and deletes it.
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/delete/c08be088-fd16-47fe-a286-3e0c24abc15b", "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": "https://local.com/comment/1", "type": "Delete", "audience": "https://remote.com/c/interesting", "cc": [ "https://remote.com/c/interesting" ] }
freamon changes his mind again, and undoes the delete
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/undo/91bd96a3-9fb8-4dde-acfb-3d7ee682a41a", "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": "https://local.com/comment/1", "type": "Delete", "id": "https://local.com/activities/delete/55f2f17e-6c5d-44f2-ae53-e65c8496dfc3", "audience": "https://remote.com/c/interesting", "cc": [ "https://remote.com/c/interesting" ] }, "type": "Undo", "audience": "https://remote.com/c/interesting", "cc": [ "https://remote.com/c/interesting" ] }