chatHistory.json 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {
  2. "type" : "object",
  3. "$schema" : "http://json-schema.org/draft-06/schema",
  4. "title" : "Lobby protocol: chatHistory",
  5. "description" : "Sent by server immediately after login to fill initial chat history",
  6. "required" : [ "type", "messages", "channelType", "channelName" ],
  7. "additionalProperties" : false,
  8. "properties" : {
  9. "type" :
  10. {
  11. "type" : "string",
  12. "const" : "chatHistory"
  13. },
  14. "channelType" :
  15. {
  16. "type" : "string",
  17. "enum" : [ "global", "match", "player" ],
  18. "description" : "Type of room to which these messages have been set."
  19. },
  20. "channelName" :
  21. {
  22. "type" : "string",
  23. "description" : "Name of room to which these messages have been set. For 'global' this is language, for 'match' and 'player' this is receiver UUID"
  24. },
  25. "messages" :
  26. {
  27. "type" : "array",
  28. "description" : "List of recent chat messages",
  29. "items" :
  30. {
  31. "type" : "object",
  32. "additionalProperties" : false,
  33. "required" : [ "messageText", "accountID", "displayName", "ageSeconds" ],
  34. "properties" : {
  35. "messageText" :
  36. {
  37. "type" : "string",
  38. "description" : "Text of sent message"
  39. },
  40. "accountID" :
  41. {
  42. "type" : "string",
  43. "description" : "ID of account that have sent this message"
  44. },
  45. "displayName" :
  46. {
  47. "type" : "string",
  48. "description" : "Display name of account that have sent this message"
  49. },
  50. "ageSeconds" :
  51. {
  52. "type" : "number",
  53. "description" : "Age of this message in seconds. For example, 10 means that this message was sent 10 seconds ago"
  54. }
  55. }
  56. }
  57. }
  58. }
  59. }