Merge pull request #45 from LemmyNet/add-remove-mod

Forgot to document add/remove mod activities, update context
This commit is contained in:
Dessalines 2021-03-22 10:42:36 -04:00 committed by GitHub
commit dbc8e80a72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,11 +60,13 @@ In the following tables, "mandatory" refers to whether or not Lemmy will accept
"sc": "http://schema.org#", "sc": "http://schema.org#",
"stickied": "as:stickied", "stickied": "as:stickied",
"sensitive": "as:sensitive", "sensitive": "as:sensitive",
"pt": "https://join.lemmy.ml#",
"comments_enabled": { "comments_enabled": {
"kind": "sc:Boolean", "type": "sc:Boolean",
"id": "pt:commentsEnabled" "id": "pt:commentsEnabled"
} }
} },
"https://w3id.org/security/v1"
] ]
} }
``` ```
@ -581,6 +583,43 @@ Reverts a previous activity, can only be done by the `actor` of `object`. In cas
|---|---|---| |---|---|---|
| `object` | yes | Any `Like`, `Dislike`, `Delete` or `Remove` activity as described above | | `object` | yes | Any `Like`, `Dislike`, `Delete` or `Remove` activity as described above |
#### Add Mod
Add a new mod (registered on `ds9.lemmy.ml`) to the community `!main@enterprise.lemmy.ml`. Has to be sent by an existing community mod.
```json
{
"@context": ...,
"id": "https://enterprise.lemmy.ml/activities/add/531471b1-3601-4053-b834-d26718da2a06",
"type": "Add",
"cc": [
"https://enterprise.lemmy.ml/c/main"
],
"to": "https://www.w3.org/ns/activitystreams#Public",
"object": "https://ds9.lemmy.ml/u/sisko",
"actor": "https://enterprise.lemmy.ml/u/picard",
"target": "https://enterprise.lemmy.ml/c/main/moderators"
}
```
#### Remove Mod
Remove an existing mod from the community. Has to be sent by an existing community mod.
```json
{
"@context": ...,
"id": "https://enterprise.lemmy.ml/activities/remove/63b9a5b2-d3f8-4371-a7eb-711c7928b3c0",
"type": "Remove",
"object": "https://ds9.lemmy.ml/u/sisko",
"to": "https://www.w3.org/ns/activitystreams#Public",
"actor": "https://enterprise.lemmy.ml/u/picard",
"cc": [
"https://enterprise.lemmy.ml/c/main"
],
"target": "https://enterprise.lemmy.ml/c/main/moderators"
}
```
### Community to User ### Community to User
#### Accept Follow #### Accept Follow