ChatSendRequest chat.send-request@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- chat
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/chat/send-request.v1.json
chat.send-request@1: what a sender hands OpenVibe.Chat to post a chat line (chat.message.send). From a browser, a frame on WS /ws/chat of type chat in the room the socket joined (the text is trimmed; empty or longer than 6000 characters is dropped, the channel's own max_message_length is enforced after that; a line starting with ! or / is a command, not a message). From Live's bridge, POST /internal/live/calls: a chat.live_bridge.write batch in which every op that sends a message (a chat or dm frame, db saveChatMessage, deployNotice) also needs chat.message.send; without it that op alone is refused.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: bridge-batch
{
"boot": "b-1727300000000",
"ops": [
{
"seq": 1,
"op": "broadcastToStream",
"args": [
42,
{
"type": "chat",
"username": "AI Viewer",
"message": "hello chat"
}
]
}
]
}Valid: ws-frame
{
"type": "chat",
"message": "gg that was clean",
"reply_to_id": 81234,
"auto_delete_minutes": 30
}Rejected: empty-message
{
"type": "chat",
"message": ""
}Rejected: no-message
{
"type": "chat",
"text": "hello"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('chat.send-request@1', value); // { valid, errors: [{ path, message }] }