Add m.room.name and state_key core schema.

pull/977/head
Kegan Dougal 10 years ago
parent a8af9bef29
commit 8ec10bbdf2

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

@ -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"
}

@ -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": "^$"
}
}
}
Loading…
Cancel
Save