Reinstate event type info

The 'typeof' info on the events was perpetrated by a fearsome hack which I
broke. I don't want to fix it any better right now, so just make the hack work
and pull the rug over.
pull/977/head
Richard van der Hoff 9 years ago
parent d17c84b819
commit 9a5673a1cc

@ -653,12 +653,15 @@ class MatrixUnits(Units):
ROOM_EVENT: "Message Event",
STATE_EVENT: "State Event"
}
if type(json_schema.get("allOf")) == list:
schema["typeof"] = base_defs.get(
json_schema["allOf"][0].get("$ref")
)
elif json_schema.get("title"):
schema["typeof"] = json_schema["title"]
json_schema = resolve_references(filepath, json_schema)
if json_schema.get("title"):
schema["typeof"] = json_schema["title"]
# add type
schema["type"] = Units.prop(
json_schema, "properties/type/enum"

Loading…
Cancel
Save