Add m.room.name and state_key core schema.

This commit is contained in:
Kegan Dougal 2015-05-18 16:21:09 +01:00
parent a8af9bef29
commit 8ec10bbdf2
3 changed files with 46 additions and 0 deletions

View file

@ -30,6 +30,18 @@
}
},
"required": ["room_id"]
},
"state_event": {
"type": "object",
"allOf":[{
"$ref": "#/definitions/room_event"
}],
"properties": {
"state_key": {
"type": "string"
}
},
"required": ["state_key"]
}
}
}

View file

@ -0,0 +1,12 @@
{
"age": 242352,
"content": {
"name": "The room name"
},
"state_key": "",
"origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost",
"type": "m.room.name",
"room_id": "!Cuyf34gef24t:localhost",
"user_id": "@example:localhost"
}

22
event-schemas/m.room.name Normal file
View file

@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"allOf": [{
"$ref": "core#/definitions/state_event"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"]
},
"state_key": {
"type": "string",
"pattern": "^$"
}
}
}