2024-03-04 14:12:42 +02:00
|
|
|
{
|
|
|
|
"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",
|
2024-03-13 23:02:53 +02:00
|
|
|
"required" : [ "type", "messages", "channelType", "channelName" ],
|
2024-03-04 14:12:42 +02:00
|
|
|
"additionalProperties" : false,
|
|
|
|
|
|
|
|
"properties" : {
|
|
|
|
"type" :
|
|
|
|
{
|
|
|
|
"type" : "string",
|
|
|
|
"const" : "chatHistory"
|
|
|
|
},
|
2024-03-13 23:02:53 +02:00
|
|
|
|
|
|
|
"channelType" :
|
|
|
|
{
|
|
|
|
"type" : "string",
|
|
|
|
"enum" : [ "global", "match", "player" ],
|
|
|
|
"description" : "Type of room to which these messages have been set."
|
|
|
|
},
|
|
|
|
"channelName" :
|
|
|
|
{
|
|
|
|
"type" : "string",
|
|
|
|
"description" : "Name of room to which these messages have been set. For 'global' this is language, for 'match' and 'player' this is receiver UUID"
|
|
|
|
},
|
|
|
|
|
2024-03-04 14:12:42 +02:00
|
|
|
"messages" :
|
|
|
|
{
|
|
|
|
"type" : "array",
|
2024-03-04 16:39:49 +02:00
|
|
|
"description" : "List of recent chat messages",
|
2024-03-04 14:12:42 +02:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|