Federated Chatting System
This is an idea for the constructs of the Federated Chatting System (FCS) protocol, it has not been accepted by the team. Written by virtuallysyrup (except for the abstract).
Abstract
This protocol is designed to facilitate standardized communications between discrete servers (referred to henceforth as 'instances' to minimize confusion) as part of the Catsup platform. Unlike many similar federation protocols, it has a scope limited to real-time communications and associated metadata; it is not suitable for usage with any other synchronization paradigms. This protocol does not rely on web technologies, instead relying primarily on TLS connections paired with CBOR.
Constructs
* = Required
User
A user represents an account whether it is manually administered or automated. This object includes the following fields:
-
id: ULID* -
host_url: String* -
username: String, maximum of 32 characters* -
identities: List of type Collection* -
password: Hash (does not federate)* -
status: Item* -
creator: Collection -
relationships: List of type Relationship -
badges: List of type Item -
flags: Int
Message
A message represents one of the main forms of communication, connected to a User or multiple connected to a Collection. This object includes the following fields:
-
id: ULID* -
host_url: String* -
identities: List of type Collection -
content: String, maximum of 2048 characters -
replies: List of Message Links, maximum of 5 -
media: List of Media Links, maximum of 5 -
embeds: List of type Media [Should this be separate from media?], maximum of 5 -
polls: List of type Media, maximum of 5 -
reactions: Map of String with value of List of type String (User Identifiers), maximum of 50 -
reply_thread: List of type Message -
edit_thread: List of type Message
Collection
A collection represents groups of itself or of Messages. This object includes the following fields:
-
id: ULID* -
host_url: String* -
type: CollectionType* -
name: String, maximum of 32 characters* -
icon: Media Link -
icon_border: Media Link -
banner: Media Link -
pronouns: String, maximum of 32 characters -
name_color: Media -
description: Message -
roles: List of type Collection -
members: List of type User -
emotes: List of type Media -
audit_logs: AuditLogs -
permissions: Permissions -
rules: List of type Rule -
themes: List of type Theme -
tags: List of type String(maximum of 32 characters) -
badges: List of type Item -
is_public: Bool -
parentCollection -
children: List of type Collection
Media
Media represents both custom emotes and any other form of media like color(s), embeds, and polls. This object includes the following fields:
-
id: ULID* -
host_url: String* -
type: MediaType* -
name: String* -
extension: String, maximum of 4 characters -
content_type: ContentType -
size: Int -
width: Int -
height: Int -
media_url: String -
color: Color -
alt_text: String, maximum of 2048 characters -
themes: List of type Theme -
title: String, maximum of 64 characters -
options: List of type Item
Color
A solid or gradient color used for embeds or name colors. This object includes the following fields:
-
type: ColorType* -
stops: Map of Float with value of Int (Color), maximum of 10 -
angle: Float
Item (Is there a better name?)
An object used for badges, user status, and poll options. This object includes the following fields:
-
id: ULID* -
host_url: String* -
icon: Media Link -
label: String, maximum of 64 characters -
reactors: List of User identifiers
Relationship
A representation of a connection between Users. This object includes the following fields:
-
id: ULID* -
target: ULID* -
relation: Relationship
Permissions
A representation of what a Collection or User are allowed or disallowed to do. This object includes the following fields:
-
allowed: Int -
denied: Int
Rule
A Rule represents what a User can get reported or reprimanded for. Custom Rules can be made. This object includes the following fields:
-
id: ULID* -
type: RuleType* -
title: String, maximum of 32 characters -
description: String, maximum of 256 characters
Audit Logs
An object that holds all previous ModerationEvents, as well as settings for which channels to post these events in. This object includes the following fields:
-
changes: List of type ModerationEvent -
invites: List of type ModerationEvent -
reports: List of type ModerationEvent -
mutes: List of type ModerationEvent -
warns: List of type ModerationEvent -
kicks: List of type ModerationEvent -
bans: List of type ModerationEvent -
blocks: List of type ModerationEvent -
system_channels: SystemChannels
Moderation Event
A representation of a Collection's activity. This object includes the following fields:
-
id: ULID* -
host_url: String -
type: EventType* -
actor_host_url: String* -
actor: ULID* -
target_host_url: String -
target: ULID -
reason: Rule -
context: String, maximum of 2048 -
group: Collection (Partial) -
code: String, maximum of 16 characters -
use_limit: Int -
expiration_date: Timestamp -
require_knock: Bool
System Channels
A representation of which (Channel type) Collection should have each type of ModerationEvent sent to, if any. This object includes the following fields:
-
id: ULID* -
changes: ULID -
invites: ULID -
reports: ULID -
mutes: ULID -
warns: ULID -
kicks: ULID -
bans: ULID -
blocks: ULID