mirror of
https://github.com/versia-pub/docs.git
synced 2026-03-13 02:49: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
|
|
@ -36,6 +36,28 @@ Notes represent a piece of content on a Versia instance. They can be posted by [
|
|||
| "messaging"; // Like Discord, Element (Matrix), Signal
|
||||
```
|
||||
</Property>
|
||||
<Property name="collections" type="NoteCollections" required={true}>
|
||||
Collections related to the note. Must contain at least `replies` and `quotes`.
|
||||
|
||||
```typescript
|
||||
type URI = string;
|
||||
|
||||
type NoteCollections = {
|
||||
replies: URI;
|
||||
quotes: URI;
|
||||
// Same format as type on Extensions
|
||||
[key: ExtensionsKey]: URI;
|
||||
}
|
||||
```
|
||||
|
||||
All URIs must resolve to either a [Collection](/structures/collection) or a [URI Collection](/structures/collection#uri-collection) of the appropriate entities. Extensions may add additional collections.
|
||||
|
||||
### Replies
|
||||
All replies to this note (have this note as their `replies_to`). [URI Collection](/structures/collection#uri-collection) of [Note](/entities/note) entities.
|
||||
|
||||
### Quotes
|
||||
All quotes of this note (have this note as their `quotes`). [URI Collection](/structures/collection#uri-collection) of [Note](/entities/note) entities.
|
||||
</Property>
|
||||
<Property name="content" type="ContentFormat" required={false} typeLink="/structures/content-format">
|
||||
The content of the note. Must be text format (`text/html`, `text/markdown`, etc). Must not be remote.
|
||||
</Property>
|
||||
|
|
@ -126,6 +148,13 @@ Notes represent a piece of content on a Versia instance. They can be posted by [
|
|||
],
|
||||
"author": "https://versia.social/users/018eb863-753f-76ff-83d6-fd590de7740a",
|
||||
"category": "microblog",
|
||||
"collections": {
|
||||
"replies": "https://versia.social/objects/01902e09-0f8b-72de-8ee3-9afc0cf5eae1/replies",
|
||||
"quotes": "https://versia.social/objects/01902e09-0f8b-72de-8ee3-9afc0cf5eae1/quotes",
|
||||
"pub.versia:likes/Likes": "https://versia.social/objects/01902e09-0f8b-72de-8ee3-9afc0cf5eae1/likes",
|
||||
"pub.versia:likes/Dislikes": "https://versia.social/objects/01902e09-0f8b-72de-8ee3-9afc0cf5eae1/dislikes",
|
||||
"pub.versia:reactions/Reactions": "https://versia.social/objects/01902e09-0f8b-72de-8ee3-9afc0cf5eae1/reactions"
|
||||
},
|
||||
"content": {
|
||||
"text/html": {
|
||||
"content": "<p>In the next versia-fe update: account settings, finally!</p>"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue