This commit was merged in pull request #8.
This commit is contained in:
22
schema/commands/TOPIC.json
Normal file
22
schema/commands/TOPIC.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.eeqj.de/sneak/chat/schema/commands/TOPIC.json",
|
||||
"title": "TOPIC",
|
||||
"description": "Get or set channel topic. C2S: set topic (body present) or query (body absent). S2C: topic change notification. RFC 1459 §4.2.4.",
|
||||
"$ref": "../message.json",
|
||||
"properties": {
|
||||
"command": { "const": "TOPIC" },
|
||||
"from": { "type": "string", "description": "Nick that changed the topic (S2C)." },
|
||||
"to": { "type": "string", "description": "Channel name.", "pattern": "^#[a-zA-Z0-9_-]+$" },
|
||||
"body": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" },
|
||||
"description": "New topic text (single-element array). Empty array clears the topic.",
|
||||
"maxItems": 1
|
||||
}
|
||||
},
|
||||
"required": ["command", "to"],
|
||||
"examples": [
|
||||
{ "command": "TOPIC", "from": "alice", "to": "#general", "body": ["Welcome to the chat"] }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user