mirror of
https://github.com/versia-pub/docs.git
synced 2025-12-06 22:38:19 +01:00
61 lines
2.1 KiB
Plaintext
61 lines
2.1 KiB
Plaintext
export const metadata = {
|
|
title: "Share Extension",
|
|
description: "Share Extension lets users share notes they like with others.",
|
|
}
|
|
|
|
# Share Extension
|
|
|
|
The Share Extension lets users share notes they like with others. This is the same as Twitter's "retweet" and Mastodon's "boost". {{ className: 'lead' }}
|
|
|
|
## Behaviour
|
|
|
|
When a user shares a note, the note's original author **must** receive the entity alongside the user's followers. In clients, `Shares` should be rendered in a way that makes it clear that the shared note was originally authored by someone else than the user who shared it.
|
|
|
|
`Shares` can be undone ("unboosting") with a [Delete](/entities/delete) entity.
|
|
|
|
## Entity Definition
|
|
|
|
<Row>
|
|
<Col>
|
|
<Properties name="Share">
|
|
<Property name="type" type="string" required={true}>
|
|
Must be `pub.versia:share/Share`.
|
|
</Property>
|
|
<Property name="author" type="Reference" required={true} typeLink="/types#referece">
|
|
[Reference](/types#reference) to the creator of the Share.
|
|
</Property>
|
|
<Property name="shared" type="Reference" required={true} typeLink="/types#reference">
|
|
[Reference](/types#reference) to the note being shared.
|
|
</Property>
|
|
</Properties>
|
|
</Col>
|
|
|
|
<Col sticky>
|
|
|
|
```jsonc {{ 'title': 'Example Share' }}
|
|
{
|
|
"id": "3e7e4750-afd4-4d99-a256-02f0710a0520",
|
|
"type": "pub.versia:share/Share",
|
|
"created_at": "2021-01-01T00:00:00.000Z",
|
|
"author": "6e0204a2-746c-4972-8602-c4f37fc63bbe",
|
|
"shared": "otherexample.org:fmKZ763jzIU8"
|
|
}
|
|
```
|
|
|
|
</Col>
|
|
</Row>
|
|
|
|
## Note Collections
|
|
|
|
The Share extension adds the following collections to the [Note](/entities/note) entity:
|
|
|
|
- `pub.versia:share/Shares`: [URI Collection](/structures/collection#uri-collection) of all the shares of the note.
|
|
|
|
## Interaction Types
|
|
|
|
<Note>
|
|
This section only applies to implementors of the [Interaction Controls Extension](/extensions/interaction-controls).
|
|
</Note>
|
|
|
|
This extension registers the following interaction types:
|
|
- `pub.versia:share#Share`, for sharing a Note. |