1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-16 10:19:47 +02:00
vcmi/config/schemas/lobbyProtocol/chatHistory.json
2024-03-08 16:32:40 +02:00

50 lines
1.2 KiB
JSON

{
"type" : "object",
"$schema" : "http://json-schema.org/draft-06/schema",
"title" : "Lobby protocol: chatHistory",
"description" : "Sent by server immediately after login to fill initial chat history",
"required" : [ "type", "messages" ],
"additionalProperties" : false,
"properties" : {
"type" :
{
"type" : "string",
"const" : "chatHistory"
},
"messages" :
{
"type" : "array",
"description" : "List of recent chat messages",
"items" :
{
"type" : "object",
"additionalProperties" : false,
"required" : [ "messageText", "accountID", "displayName", "ageSeconds" ],
"properties" : {
"messageText" :
{
"type" : "string",
"description" : "Text of sent message"
},
"accountID" :
{
"type" : "string",
"description" : "ID of account that have sent this message"
},
"displayName" :
{
"type" : "string",
"description" : "Display name of account that have sent this message"
},
"ageSeconds" :
{
"type" : "number",
"description" : "Age of this message in seconds. For example, 10 means that this message was sent 10 seconds ago"
}
}
}
}
}
}