Document message formats as-is

This is likely to later be replaced by mixins, however this is being documented now so clients aren't left in the dark.

Fixes https://github.com/matrix-org/matrix-doc/issues/917
pull/977/head
Travis Ralston 6 years ago
parent c79010f0d6
commit 55e4e90ab1

@ -2,7 +2,9 @@
"age": 242352,
"content": {
"body": "thinks this is an example emote",
"msgtype": "m.emote"
"msgtype": "m.emote",
"format": "org.matrix.custom.html",
"formatted_body": "thinks <b>this</b> is an example emote"
},
"origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost",

@ -2,7 +2,9 @@
"age": 242352,
"content": {
"body": "This is an example text message",
"msgtype": "m.text"
"msgtype": "m.text",
"format": "org.matrix.custom.html",
"formatted_body": "<b>This is an example text message</b>"
},
"origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost",

@ -12,6 +12,16 @@ properties:
enum:
- m.emote
type: string
format:
description: |-
The format used in the ``formatted_body``. Currently only
``org.matrix.custom.html`` is supported.
type: string
formatted_body:
description: |-
The formatted version of the ``body``. This is required if ``format``
is specified.
type: string
required:
- msgtype
- body

@ -12,6 +12,16 @@ properties:
enum:
- m.text
type: string
format:
description: |-
The format used in the ``formatted_body``. Currently only
``org.matrix.custom.html`` is supported.
type: string
formatted_body:
description: |-
The formatted version of the ``body``. This is required if ``format``
is specified.
type: string
required:
- msgtype
- body

Loading…
Cancel
Save