Message bodies are always arrays of strings (text lines) or objects (structured data like PUBKEY). Never raw strings. This enables: - Multiline messages without escape sequences - Deterministic JSON canonicalization (RFC 8785 JCS) for signing - Structured data where needed Update all schemas: body fields use array type with string items. Update message.json envelope: body is oneOf[array, object], id is UUID. Update README: message envelope table, examples, and canonicalization docs. Update schema/README.md: field types, examples with array bodies.
22 lines
772 B
JSON
22 lines
772 B
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://git.eeqj.de/sneak/chat/schema/commands/NOTICE.json",
|
|
"title": "NOTICE",
|
|
"description": "Send a notice. Like PRIVMSG but must not trigger automatic replies. RFC 1459 §4.4.2.",
|
|
"$ref": "../message.json",
|
|
"properties": {
|
|
"command": { "const": "NOTICE" },
|
|
"from": { "type": "string" },
|
|
"to": { "type": "string", "description": "Target: #channel, nick, or * (global)." },
|
|
"body": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"description": "Notice text lines."
|
|
}
|
|
},
|
|
"required": ["command", "to", "body"],
|
|
"examples": [
|
|
{ "command": "NOTICE", "from": "server.example.com", "to": "*", "body": ["Server restarting in 5 minutes"] }
|
|
]
|
|
}
|