mirror of
https://github.com/versia-pub/docs.git
synced 2026-03-13 02:49:16 +01:00
refactor: ♻️ Add URI Collections and change all appropriate Collections to use them
This commit is contained in:
parent
3babd7a5a3
commit
b59b6b8ebb
8 changed files with 71 additions and 12 deletions
|
|
@ -102,7 +102,7 @@ Extensions **may** choose to register their own interaction types (such as `pub.
|
|||
|
||||
Implementations that find a user attempting to create an interaction they are not allowed to **MUST** return a `403 Forbidden` HTTP status code when processing the Note during federation. The Note **must** also be discarded.
|
||||
|
||||
It is important for implementations to backfill any related [Collections](/structures/collection) (e.g. user followers) in order to not incorrectly reject Notes based off of outdated data.
|
||||
It is important for implementations to backfill any related [Collections](/structures/collection)/[URI Collections](/structures/collection#uri-collection) (e.g. user followers) in order to not incorrectly reject Notes based off of outdated data.
|
||||
|
||||
<Note>
|
||||
To avoid server load from constant Collection refreshing, implementations **could** only refetch associated Collections when forbidden interactions are detected, then recalculate permissions again.
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ To undo a like or dislike, a [Delete](/entities/delete) entity should be used. T
|
|||
|
||||
The Likes extension adds the following collections to the [User](/entities/user) entity:
|
||||
|
||||
- `likes`: A [Collection](/structures/collection) of all the notes the user has liked.
|
||||
- `dislikes`: A [Collection](/structures/collection) of all the notes the user has disliked.
|
||||
- `likes`: A [URI Collection](/structures/collection#uri-collection) of all the notes the user has liked.
|
||||
- `dislikes`: A [URI Collection](/structures/collection#uri-collection) of all the notes the user has disliked.
|
||||
|
||||
```jsonc
|
||||
{
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ The Reactions Extension extends the [Note](/entities/note) entity with the follo
|
|||
<Col>
|
||||
<Properties>
|
||||
<Property name="reactions" type="array" required>
|
||||
URI to a [Collection](/structures/collection) of the [Reactions](#entity-definition) attached to the note.
|
||||
URI to a [URI Collection](/structures/collection#uri-collection) of the [Reactions](#entity-definition) attached to the note.
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue