mirror of
https://github.com/versia-pub/docs.git
synced 2025-12-06 06:18:19 +01:00
refactor: ♻️ Move Groups to an extension
This commit is contained in:
parent
46297d538c
commit
fe451d018c
|
|
@ -18,7 +18,9 @@ This page lists changes since Working Draft 3. {{ className: 'lead' }}
|
||||||
- `X-Signed-By` to `Versia-Signed-By`
|
- `X-Signed-By` to `Versia-Signed-By`
|
||||||
- Removed the nonce from the [signature system](/signatures), replaced with `Versia-Signed-At` (timestamps).
|
- Removed the nonce from the [signature system](/signatures), replaced with `Versia-Signed-At` (timestamps).
|
||||||
- Standardize rate limits with [IETF draft draft-polli-ratelimit-headers-02](https://www.ietf.org/archive/id/draft-polli-ratelimit-headers-02.html).
|
- Standardize rate limits with [IETF draft draft-polli-ratelimit-headers-02](https://www.ietf.org/archive/id/draft-polli-ratelimit-headers-02.html).
|
||||||
- Properly documented [Group](/entities/group) federation and subscribing.
|
- Properly documented [Group](/extensions/groups) federation and subscribing.
|
||||||
|
- Moved [Groups](/extensions/groups) to an extension, as they were getting too complex for the core protocol.
|
||||||
|
- The [Note](/entities/note) `group` field documentation has been updated to reflect this.
|
||||||
- Added [Versia Links](/links).
|
- Added [Versia Links](/links).
|
||||||
- Switched from ISO 8601 to [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) for timestamps.
|
- Switched from ISO 8601 to [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) for timestamps.
|
||||||
- In most cases, the two are interchangeable, but RFC 3339 is more strict. Most implementations should not need to change anything.
|
- In most cases, the two are interchangeable, but RFC 3339 is more strict. Most implementations should not need to change anything.
|
||||||
|
|
|
||||||
|
|
@ -73,11 +73,15 @@ Notes represent a piece of content on a Versia instance. They can be posted by [
|
||||||
```
|
```
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="group" type="URI | "public" | "followers"" required={false} typeLink="/types#uri">
|
<Property name="group" type="URI | "public" | "followers"" required={false} typeLink="/types#uri">
|
||||||
URI of a [Group](/entities/group) that the note is only visible in, or one of the following strings:
|
URI of a [Group](/extensions/groups) that the note is only visible in, or one of the following strings:
|
||||||
- `public`: The note is visible to anyone.
|
- `public`: The note is visible to anyone.
|
||||||
- `followers`: The note is visible only to the author's followers.
|
- `followers`: The note is visible only to the author's followers.
|
||||||
|
|
||||||
If not provided, the note is only visible to the author and those mentioned in the note.
|
If not provided, the note is only visible to the author and those mentioned in the note. If missing, the note is only visible to any mentioned users.
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
If the implementation does not support the [Groups Extension](/extensions/groups), any value other than `public` or `followers` should be treated as `null`.
|
||||||
|
</Note>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="is_sensitive" type="boolean" required={false}>
|
<Property name="is_sensitive" type="boolean" required={false}>
|
||||||
Whether the note contains "sensitive content". This can be used with `subject` as a "content warning" feature.
|
Whether the note contains "sensitive content". This can be used with `subject` as a "content warning" feature.
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
title: 'Groups',
|
title: 'Groups Extension',
|
||||||
description: 'Groups are a way to organize users and notes into communities.'
|
description: 'Groups are a way to organize users and notes into communities.'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Groups
|
# Groups Extension
|
||||||
|
|
||||||
Groups are a way to organize users and notes into communities. They can be used for any purpose, such as forums, blogs, image galleries, video sharing, audio sharing, and messaging. They are similar to Discord's channels or Matrix's rooms. {{ className: 'lead' }}
|
Groups are a way to organize users and notes into communities. They can be used for any purpose, such as forums, blogs, image galleries, video sharing, audio sharing, and messaging. They are similar to Discord's channels or Matrix's rooms. {{ className: 'lead' }}
|
||||||
|
|
||||||
|
|
@ -14,6 +14,9 @@ Refer to [Note](/entities/note#entity-definition)'s `group` property for how not
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="type" type="string" required={true}>
|
||||||
|
Must be `pub.versia:groups/Group`.
|
||||||
|
</Property>
|
||||||
<Property name="name" type="ContentFormat" required={false} typeLink="/structures/content-format">
|
<Property name="name" type="ContentFormat" required={false} typeLink="/structures/content-format">
|
||||||
Group name/title.
|
Group name/title.
|
||||||
|
|
||||||
|
|
@ -46,7 +49,7 @@ Refer to [Note](/entities/note#entity-definition)'s `group` property for how not
|
||||||
|
|
||||||
```jsonc {{ title: "Example Group" }}
|
```jsonc {{ title: "Example Group" }}
|
||||||
{
|
{
|
||||||
"type": "Group",
|
"type": "pub.versia:groups/Group",
|
||||||
"id": "ed480922-b095-4f09-9da5-c995be8f5960",
|
"id": "ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
"uri": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
"uri": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
"name": {
|
"name": {
|
||||||
|
|
@ -82,6 +85,9 @@ Indicates that a [User](/entities/user) wishes to subscribe to a group.
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="type" type="string" required={true}>
|
||||||
|
Must be `pub.versia:groups/Subscribe`.
|
||||||
|
</Property>
|
||||||
<Property name="uri" type="null" required={false}>
|
<Property name="uri" type="null" required={false}>
|
||||||
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
||||||
</Property>
|
</Property>
|
||||||
|
|
@ -98,7 +104,7 @@ Indicates that a [User](/entities/user) wishes to subscribe to a group.
|
||||||
|
|
||||||
```jsonc {{ title: "Example GroupSubscribe" }}
|
```jsonc {{ title: "Example GroupSubscribe" }}
|
||||||
{
|
{
|
||||||
"type": "GroupSubscribe",
|
"type": "pub.versia:groups/Subscribe",
|
||||||
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
||||||
"subscriber": "https://bob.social/users/e9277471-8aa1-4d40-a3d0-0878e818ccdc",
|
"subscriber": "https://bob.social/users/e9277471-8aa1-4d40-a3d0-0878e818ccdc",
|
||||||
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
|
|
@ -116,6 +122,9 @@ Indicates that a [User](/entities/user) wishes to unsubscribe from a group.
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="type" type="string" required={true}>
|
||||||
|
Must be `pub.versia:groups/Unsubscribe`.
|
||||||
|
</Property>
|
||||||
<Property name="uri" type="null" required={false}>
|
<Property name="uri" type="null" required={false}>
|
||||||
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
||||||
</Property>
|
</Property>
|
||||||
|
|
@ -132,7 +141,7 @@ Indicates that a [User](/entities/user) wishes to unsubscribe from a group.
|
||||||
|
|
||||||
```jsonc {{ title: "Example GroupUnsubscribe" }}
|
```jsonc {{ title: "Example GroupUnsubscribe" }}
|
||||||
{
|
{
|
||||||
"type": "GroupUnsubscribe",
|
"type": "pub.versia:groups/Unsubscribe",
|
||||||
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
||||||
"subscriber": "https://bob.social/users/e9277471-8aa1-4d40-a3d0-0878e818ccdc",
|
"subscriber": "https://bob.social/users/e9277471-8aa1-4d40-a3d0-0878e818ccdc",
|
||||||
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
|
|
@ -150,6 +159,9 @@ Indicates that a [Group](#entity-definition) has accepted a [User](/entities/use
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="type" type="string" required={true}>
|
||||||
|
Must be `pub.versia:groups/SubscribeAccept`.
|
||||||
|
</Property>
|
||||||
<Property name="uri" type="null" required={false}>
|
<Property name="uri" type="null" required={false}>
|
||||||
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
||||||
</Property>
|
</Property>
|
||||||
|
|
@ -166,7 +178,7 @@ Indicates that a [Group](#entity-definition) has accepted a [User](/entities/use
|
||||||
|
|
||||||
```jsonc {{ title: "Example GroupSubscribeAccept" }}
|
```jsonc {{ title: "Example GroupSubscribeAccept" }}
|
||||||
{
|
{
|
||||||
"type": "GroupSubscribeAccept",
|
"type": "pub.versia:groups/SubscribeAccept",
|
||||||
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
||||||
"subscriber": "https://bob.social/users/e9277471-8aa1-4d40-a3d0-0878e818ccdc",
|
"subscriber": "https://bob.social/users/e9277471-8aa1-4d40-a3d0-0878e818ccdc",
|
||||||
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
|
|
@ -184,6 +196,9 @@ Indicates that a [Group](#entity-definition) has rejected a [User](/entities/use
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="type" type="string" required={true}>
|
||||||
|
Must be `pub.versia:groups/SubscribeReject`.
|
||||||
|
</Property>
|
||||||
<Property name="uri" type="null" required={false}>
|
<Property name="uri" type="null" required={false}>
|
||||||
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
||||||
</Property>
|
</Property>
|
||||||
|
|
@ -200,7 +215,7 @@ Indicates that a [Group](#entity-definition) has rejected a [User](/entities/use
|
||||||
|
|
||||||
```jsonc {{ title: "Example GroupSubscribeReject" }}
|
```jsonc {{ title: "Example GroupSubscribeReject" }}
|
||||||
{
|
{
|
||||||
"type": "GroupSubscribeReject",
|
"type": "pub.versia:groups/SubscribeReject",
|
||||||
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
||||||
"subscriber": "https://bob.social/users/e9277471-8aa1-4d40-a3d0-0878e818ccdc",
|
"subscriber": "https://bob.social/users/e9277471-8aa1-4d40-a3d0-0878e818ccdc",
|
||||||
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
|
|
@ -226,6 +241,9 @@ The `GroupFederate` entity allows a group to federate a note to all of its membe
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="type" type="string" required={true}>
|
||||||
|
Must be `pub.versia:groups/Federate`.
|
||||||
|
</Property>
|
||||||
<Property name="uri" type="null" required={false}>
|
<Property name="uri" type="null" required={false}>
|
||||||
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
This is a [**Transient Entity**](/entities#transient-entities) and does not have a URI.
|
||||||
</Property>
|
</Property>
|
||||||
|
|
@ -242,7 +260,7 @@ The `GroupFederate` entity allows a group to federate a note to all of its membe
|
||||||
|
|
||||||
```jsonc {{ title: "Example GroupFederate" }}
|
```jsonc {{ title: "Example GroupFederate" }}
|
||||||
{
|
{
|
||||||
"type": "GroupFederate",
|
"type": "pub.versia:groups/Federate",
|
||||||
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
"id": "9a7e9345-4e4a-4d5a-8301-4dbbfe777ca0",
|
||||||
"note": "https://example.com/notes/ed480922-b095-4f09-9da5-c995be8f5960",
|
"note": "https://example.com/notes/ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
"group": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
|
|
@ -66,7 +66,7 @@ The entity defined in this document must be inserted in the `pub.versia:interact
|
||||||
- `followers`: Includes every follower of the author.
|
- `followers`: Includes every follower of the author.
|
||||||
- `following`: Includes every User that the author follows.
|
- `following`: Includes every User that the author follows.
|
||||||
- `mutuals`: Includes every mutual of the author (that is, every User that is both a follower and followed by the author).
|
- `mutuals`: Includes every mutual of the author (that is, every User that is both a follower and followed by the author).
|
||||||
- `group`: Includes every User in the [Group](/entities/group) that this Note was posted to, if any. If Note is not posted to a [Group](/entities/group), this value has no effect.
|
- `group`: Includes every User in the [Group](/extensions/groups) that this Note was posted to, if any. If Note is not posted to a [Group](/extensions/groups), this value has no effect.
|
||||||
|
|
||||||
Permission groups are evaluated from highest to lowest priority: if two groups conflict each other, the group with the highest priority must be used.
|
Permission groups are evaluated from highest to lowest priority: if two groups conflict each other, the group with the highest priority must be used.
|
||||||
</Property>
|
</Property>
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ Extensions can be found in two places: an [Entity](/entities#entity-definition)'
|
||||||
|
|
||||||
```jsonc {{ title: "Example Entity Extension" }}
|
```jsonc {{ title: "Example Entity Extension" }}
|
||||||
{
|
{
|
||||||
"type": "Group",
|
"type": "pub.versia:groups/Group",
|
||||||
"id": "ed480922-b095-4f09-9da5-c995be8f5960",
|
"id": "ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
"uri": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
"uri": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
|
||||||
"name": null,
|
"name": null,
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,6 @@ export const navigation: NavGroup[] = [
|
||||||
{ title: "Follow", href: "/entities/follow" },
|
{ title: "Follow", href: "/entities/follow" },
|
||||||
{ title: "FollowAccept", href: "/entities/follow-accept" },
|
{ title: "FollowAccept", href: "/entities/follow-accept" },
|
||||||
{ title: "FollowReject", href: "/entities/follow-reject" },
|
{ title: "FollowReject", href: "/entities/follow-reject" },
|
||||||
{ title: "Group", href: "/entities/group" },
|
|
||||||
{ title: "Notes", href: "/entities/note" },
|
{ title: "Notes", href: "/entities/note" },
|
||||||
{ title: "InstanceMetadata", href: "/entities/instance-metadata" },
|
{ title: "InstanceMetadata", href: "/entities/instance-metadata" },
|
||||||
{ title: "Unfollow", href: "/entities/unfollow" },
|
{ title: "Unfollow", href: "/entities/unfollow" },
|
||||||
|
|
@ -295,6 +294,7 @@ export const navigation: NavGroup[] = [
|
||||||
title: "Extensions",
|
title: "Extensions",
|
||||||
links: [
|
links: [
|
||||||
{ title: "Custom Emojis", href: "/extensions/custom-emojis" },
|
{ title: "Custom Emojis", href: "/extensions/custom-emojis" },
|
||||||
|
{ title: "Groups", href: "/extensions/groups" },
|
||||||
{
|
{
|
||||||
title: "Instance Messaging",
|
title: "Instance Messaging",
|
||||||
href: "/extensions/instance-messaging",
|
href: "/extensions/instance-messaging",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue