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.
The community mod at remote.com decides to make freamon a moderator
{ "@context": "https://www.w3.org/ns/activitystreams", "actor": "https://remote.com/u/mod", "to": "https://www.w3.org/ns/activitystreams#Public", "object": "https://local.com/u/freamon", "target": "https://remote.com/c/interesting/moderators", "cc": "https://remote.com/c/interesting", "type": "Add", "id": "https://remote.com/activities/add/390751ec-9b21-4585-875f-2fb088c69c5a", "audience": "https://remote.com/c/interesting" }
Replies to this comment are all moderator actions.
As a moderator, freamon decides to remove a post
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/delete/2de802ce-f032-4327-985b-4078bc7fe2c5", "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": "https://local.com/post/3", "type": "Delete", "audience": "https://remote.com/c/interesting", "cc": [ "https://remote.com/c/interesting" ], "summary": "Post was bad." }
freamon changes his mind, and restores the post
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/undo/d9fb7304-74f2-4724-8c45-1871054ae334", "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/post/3", "type": "Delete", "id": "https://local.com/activities/delete/11c44e39-e2b9-4649-b3ee-f8c602075f89", "audience": "https://remote.com/c/interesting", "cc": [ "https://remote.com/c/interesting" ], "summary": "Post was actually Good" }, "type": "Undo", "audience": "https://remote.com/c/interesting", "cc": [ "https://remote.com/c/interesting" ] }
A bad guy has joined and posted weird stuff. freamon bans him, and removes his content
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/block/ff2c17e1-cab6-48a5-9615-380c929ca268", "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": "https://local.com/u/bad_guy", "cc": [ "https://remote.com/c/interesting" ], "target": "https://remote.com/c/interesting", "type": "Block", "audience": "https://remote.com/c/interesting", "removeData": true, "summary": "Terrible Person" }
freamon uses his new-found powers to edit the sidebar
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/update/20f7397d-f124-45aa-a1b2-b8366c17f6db", "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Group", "id": "https://remote.com/c/interesting", "preferredUsername": "interesting", "inbox": "https://remote.com/c/interesting/inbox", "followers": "https://remote.com/c/interesting/followers", "publicKey": { "id": "https://remote.com/c/interesting#main-key", "owner": "https://remote.com/c/interesting", "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAovFqf5abQp7EpeiwTku9\nUkp5nzFIk6ny/89hfMOrZigJR5RUG44J+TFnT8mHompvViDSQXP4qwJ8bVqQySpU\nIXzm4pKy1ykmuh+Ez0yS3/VaUHLYYi8vXhq5yMc70lIBsZ36KnBspFQBNW7ToHMI\nJia9du/2shxq1huApgpUFbVq/I4FLHQSKYVStCxWkJhTakNxvBLvVBroFF8Izwur\n/d79mTV40scCJX/HkgFqlxFYmmrc1/M2P2Ci3VS5u0oebBHwivvm6QTOVCHIIIgc\n7JM1eo/TdJ0QNkSE6YqSAEbSF1M1KODUPmfvyVrOuUCNJ2V64anD2b6tWCIyHlDN\nvwIDAQAB\n-----END PUBLIC KEY-----\n" }, "name": "An Interesting Community", "summary": "<h4>An interesting community</h4>\n", "source": { "content": "#### An interesting community", "mediaType": "text/markdown" }, "sensitive": false, "attributedTo": "https://remote.com/c/interesting/moderators", "postingRestrictedToMods": false, "outbox": "https://remote.com/c/interesting/outbox", "endpoints": { "sharedInbox": "https://remote.com/inbox" }, "featured": "https://remote.com/c/interesting/featured", "language": [ { "identifier": "und", "name": "Undetermined" }, { "identifier": "en", "name": "English" } ], "published": "2024-01-01T17:22:16Z", "updated": "2024-02-13T22:05:25.819020Z" }, "cc": [ "https://remote.com/c/interesting" ], "type": "Update", "audience": "https://remote.com/c/interesting" }
freamon likes his own post so much he stickies it, to feature it in the community
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/add/aaa2adb4-43b8-4c90-a734-5c108cedf420", "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": "https://local.com/post/3", "target": "https://remote.com/c/interesting/featured", "cc": [ "https://remote.com/c/interesting" ], "type": "Add", "audience": "https://remote.com/c/interesting" }
Note: /c/interesting/featured is more for mastodon’s benefit, I think.
freamon leaves the mod team
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/remove/535ac463-e306-48d1-9984-32d460b90e35", "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": "https://local.com/u/freamon", "cc": [ "https://remote.com/c/interesting" ], "type": "Remove", "target": "https://remote.com/c/interesting/moderators", "audience": "https://remote.com/c/interesting" }
freamon deletes the community from the local server
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "id": "https://local.com/activities/delete/a41b378b-fff8-45ae-80cd-ac923d4d7071", "actor": "https://local.com/u/freamon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": "https://remote.com/c/interesting", "type": "Delete", "audience": "https://remote.com/c/interesting", "cc": [ "https://remote.com/c/interesting" ] }