mirror of
https://github.com/versia-pub/docs.git
synced 2026-03-13 10:59:16 +01:00
feat: ✨ Add collections field to Notes
This commit is contained in:
parent
b59b6b8ebb
commit
e97b86f983
9 changed files with 95 additions and 38 deletions
|
|
@ -50,48 +50,22 @@ User reactions are (like every other entity) federated to all followers, and can
|
|||
</Col>
|
||||
</Row>
|
||||
|
||||
## Extensions to Note
|
||||
## Note Collections
|
||||
|
||||
The Reactions Extension extends the [Note](/entities/note) entity with the following fields:
|
||||
The Likes extension adds the following collections to the [Note](/entities/note) entity:
|
||||
|
||||
<Row>
|
||||
<Col>
|
||||
<Properties>
|
||||
<Property name="reactions" type="array" required>
|
||||
URI to a [URI Collection](/structures/collection#uri-collection) of the [Reactions](#entity-definition) attached to the note.
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
- `reactions`: A [URI Collection](/structures/collection#uri-collection) of all the reactions to the note.
|
||||
|
||||
<Col sticky>
|
||||
|
||||
```jsonc {{ title: "Example Note" }}
|
||||
{
|
||||
"id": "01902e09-0f8b-72de-8ee3-9afc0cf5eae1",
|
||||
"type": "Note", // [!code focus]
|
||||
"uri": "https://versia.social/notes/01902e09-0f8b-72de-8ee3-9afc0cf5eae1",
|
||||
"created_at": "2024-06-19T01:07:44.139Z",
|
||||
"author": "https://versia.social/users/018eb863-753f-76ff-83d6-fd590de7740a",
|
||||
"category": "microblog",
|
||||
"content": {
|
||||
"text/plain": {
|
||||
"content": "Bababooey."
|
||||
}
|
||||
},
|
||||
"extensions": { // [!code focus:5]
|
||||
"pub.versia:reactions": {
|
||||
"reactions": "https://versia.social/notes/01902e09-0f8b-72de-8ee3-9afc0cf5eae1/reactions"
|
||||
}
|
||||
},
|
||||
"group": "public",
|
||||
"is_sensitive": false,
|
||||
"mentions": [],
|
||||
```jsonc
|
||||
{
|
||||
"type": "Note",
|
||||
...
|
||||
"collections": {
|
||||
...
|
||||
"pub.versia:reactions/Reactions": "https://example.com/publications/f08a124e-fe90-439e-8be4-15a428a72a19/reactions"
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
}
|
||||
```
|
||||
|
||||
## Interaction Types
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue