mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
Shift msgtype section order to have common (implemented) types first.
This commit is contained in:
parent
6f330bd879
commit
e046402a4a
|
|
@ -34,7 +34,16 @@ class MatrixSections(Sections):
|
||||||
examples = self.units.get("event_examples")
|
examples = self.units.get("event_examples")
|
||||||
schemas = self.units.get("event_schemas")
|
schemas = self.units.get("event_schemas")
|
||||||
sections = []
|
sections = []
|
||||||
for event_name in sorted(schemas):
|
msgtype_order = [
|
||||||
|
"m.room.message#m.text", "m.room.message#m.emote",
|
||||||
|
"m.room.message#m.notice", "m.room.message#m.image",
|
||||||
|
"m.room.message#m.file"
|
||||||
|
]
|
||||||
|
other_msgtypes = [
|
||||||
|
k for k in schemas.keys() if k.startswith("m.room.message#") and
|
||||||
|
k not in msgtype_order
|
||||||
|
]
|
||||||
|
for event_name in (msgtype_order + other_msgtypes):
|
||||||
if not event_name.startswith("m.room.message#m."):
|
if not event_name.startswith("m.room.message#m."):
|
||||||
continue
|
continue
|
||||||
sections.append(template.render(
|
sections.append(template.render(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue