Link to msgtypes from the description of m.room.message.
This commit is contained in:
parent
9901d4f695
commit
f134728268
2 changed files with 10 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue