feat: Add Share extension

This commit is contained in:
Jesse Wierzbinski 2024-08-18 17:34:17 +02:00
parent 64cf9d3509
commit c9b6ef8011
No known key found for this signature in database
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,48 @@
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>
<Property name="extension_type" type="string" required={true}>
Must be `pub.versia:share/Share`.
</Property>
<Property name="author" type="URI" required={true} typeLink="/types#uri">
Creator of the Share.
</Property>
<Property name="shared" type="URI" required={true} typeLink="/types#uri">
URI of the note being shared. Must link to a [Note](/entities/note).
</Property>
</Properties>
</Col>
<Col sticky>
```jsonc {{ 'title': 'Example Share' }}
{
"id": "3e7e4750-afd4-4d99-a256-02f0710a0520",
"type": "Extension",
"extension_type": "pub.versia:share/Share",
"created_at": "2021-01-01T00:00:00.000Z",
"author": "https://example.com/users/6e0204a2-746c-4972-8602-c4f37fc63bbe",
"uri": "https://example.com/shares/3e7e4750-afd4-4d99-a256-02f0710a0520",
"shared": "https://otherexample.org/notes/fmKZ763jzIU8"
}
```
</Col>
</Row>

View file

@ -289,6 +289,7 @@ export const navigation: NavGroup[] = [
links: [
{ title: "Custom Emojis", href: "/extensions/custom-emojis" },
{ title: "Likes", href: "/extensions/likes" },
{ title: "Share", href: "/extensions/share" },
{ title: "Vanity", href: "/extensions/vanity" },
{ title: "WebSockets", href: "/extensions/websockets" },
],