Link to msgtypes from the description of m.room.message.

pull/977/head
Kegan Dougal 9 years ago
parent 9901d4f695
commit f134728268

@ -29,7 +29,7 @@ m.room.message msgtypes
How a client should handle unknown message types. How a client should handle unknown message types.
Each ``m.room.message`` MUST have a ``msgtype`` key which identifies the type Each `m.room.message`_ MUST have a ``msgtype`` key which identifies the type
of message being sent. Each type has their own required and optional keys, as of message being sent. Each type has their own required and optional keys, as
outlined below. outlined below.

@ -194,7 +194,15 @@ class MatrixUnits(Units):
if msgtype: if msgtype:
schema["msgtype"] = msgtype[0] # enum prop schema["msgtype"] = msgtype[0] # enum prop
# Assign state key info # link to msgtypes for m.room.message
if schema["type"] == "m.room.message" and not msgtype:
schema["desc"] += (
" For more information on ``msgtypes``, see "+
"`m.room.message msgtypes`_."
)
# Assign state key info if it has some
if schema["typeof"] == "State Event": if schema["typeof"] == "State Event":
skey_desc = Units.prop( skey_desc = Units.prop(
json_schema, "properties/state_key/description" json_schema, "properties/state_key/description"

Loading…
Cancel
Save