feat: Add Group

This commit is contained in:
Jesse Wierzbinski 2024-08-18 13:34:05 +02:00
parent 1f864b89c8
commit c8cba54a72
No known key found for this signature in database
3 changed files with 60 additions and 1 deletions

View file

@ -0,0 +1,58 @@
export const metadata = {
title: 'Groups',
description: 'Groups are a way to organize users and notes into communities.'
}
# Groups
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' }}
Refer to [Note](/entities/note#entity-definition)'s `group` property for how notes can be associated with groups.
## Entity Definition
<Row>
<Col>
<Properties>
<Property name="name" type="ContentFormat" required={false} typeLink="/structures/content-format">
Group name/title.
Text only (`text/plain`, `text/html`, etc).
</Property>
<Property name="description" type="ContentFormat" required={false} typeLink="/structures/content-format">
Short description of the group's contents and purpose.
Text only (`text/plain`, `text/html`, etc).
</Property>
<Property name="members" type="URI" required={true} typeLink="/types#uri">
URI of the group's members list. [Collection](/structures/collection) of [Users](/entities/user).
</Property>
<Property name="notes" type="URI" required={false} typeLink="/types#uri">
URI of the group's associated notes. [Collection](/structures/collection) of [Notes](/entities/note).
</Property>
</Properties>
</Col>
<Col sticky>
```jsonc {{ title: "Example Group" }}
{
"type": "Group",
"id": "ed480922-b095-4f09-9da5-c995be8f5960",
"uri": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960",
"name": {
"text/html": {
"content": "The <strong>Woozy</strong> fan club"
}
},
"description": {
"text/plain": {
"content": "A group for fans of the Woozy emoji."
}
},
"members": "https://example.com/groups/ed480922-b095-4f09-9da5-c995be8f5960/members",
}
```
</Col>
</Row>

View file

@ -51,7 +51,7 @@ Notes represent a piece of content on a Versia instance. They can be posted by [
``` ```
</Property> </Property>
<Property name="group" type="URI | &quot;public&quot; | &quot;followers&quot;" required={false} typeLink="/types#uri"> <Property name="group" type="URI | &quot;public&quot; | &quot;followers&quot;" required={false} typeLink="/types#uri">
URI of a [Group](/groups) that the note is only visible in, or one of the following strings: URI of a [Group](/entities/group) 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.

View file

@ -276,6 +276,7 @@ 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" },