Document instance actor (#123)

This commit is contained in:
Nutomic 2022-02-09 17:13:29 +00:00 committed by GitHub
parent 3625c7ccdd
commit 2a1bd5f957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 5 deletions

View file

@ -12,6 +12,7 @@ Before reading this, have a look at our [Federation Overview](contributing_feder
- [Actors](#actors)
* [Community](#community)
* [User](#user)
* [Instance](#instance)
- [Objects](#objects)
* [Post](#post)
* [Comment](#comment)
@ -117,6 +118,27 @@ Sends and receives activities from/to other users: `Create/Note`, `Update/Note`,
The user inbox is not actually implemented yet, and is only a placeholder for ActivityPub implementations which require it.
### Instance
Represents a Lemmy instance, and is used to federate global data like the instance description or site bans. It can be fetched from the root path.
```json
{{#include ../../../include/crates/apub/assets/lemmy/objects/instance.json}}
```
| Field Name | Description |
|-------------|----------------------------------------------------------|
| `name` | Instance name |
| `summary` | Short description |
| `content` | Long description (sidebar) |
| `icon` | Instance icon |
| `image` | Instance banner |
| `inbox` | ActivityPub inbox URL |
| `endpoints` | Contains URL of shared inbox |
| `published` | Datetime when the instance was created |
| `updated` | Datetime when the instance metadata |
| `publicKey` | The public key used to verify signatures from this actor |
## Objects
### Post
@ -337,10 +359,11 @@ Remove an existing mod from the community. Has to be sent by an existing communi
#### Block User
Blocks a user from a community, so he can't participate in it.
Blocks a user so he can't participate anymore. The scope is determined by the `target` field: either a community, or a whole instance. The `remove_data` field can optionally be set to indicate that all previous posts of the user should
be deleted.
```json
{{#include ../../../include/crates/apub/assets/lemmy/activities/community/block_user.json}}
{{#include ../../../include/crates/apub/assets/lemmy/activities/block/block_user.json}}
```
#### Undo Block User
@ -348,7 +371,7 @@ Blocks a user from a community, so he can't participate in it.
Reverts a previous user block.
```json
{{#include ../../../include/crates/apub/assets/lemmy/activities/community/block_user.json}}
{{#include ../../../include/crates/apub/assets/lemmy/activities/block/undo_block_user.json}}
```
### User to User

View file

@ -340,7 +340,7 @@ Remove an existing mod from the community. Has to be sent by an existing communi
Blocks a user from a community, so he can't participate in it.
```json
{{#include ../../../include/crates/apub/assets/lemmy/activities/community/block_user.json}}
{{#include ../../../include/crates/apub/assets/lemmy/activities/block/block_user.json}}
```
#### Undo Block User
@ -348,7 +348,7 @@ Blocks a user from a community, so he can't participate in it.
Reverts a previous user block.
```json
{{#include ../../../include/crates/apub/assets/lemmy/activities/community/block_user.json}}
{{#include ../../../include/crates/apub/assets/lemmy/activities/block/block_user.json}}
```
### User to User