Merge pull request #1397 from turt2live/travis/text-format

Document message formats as-is
pull/1379/head^2
Travis Ralston 6 years ago committed by GitHub
commit 808a82e811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
Document message formats on ``m.text`` and ``m.emote`` messages

@ -2,7 +2,9 @@
"age": 242352, "age": 242352,
"content": { "content": {
"body": "thinks this is an example emote", "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, "origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost", "event_id": "$WLGTSEFSEF:localhost",

@ -2,7 +2,9 @@
"age": 242352, "age": 242352,
"content": { "content": {
"body": "This is an example text message", "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, "origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost", "event_id": "$WLGTSEFSEF:localhost",

@ -12,6 +12,16 @@ properties:
enum: enum:
- m.emote - m.emote
type: string 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: required:
- msgtype - msgtype
- body - body

@ -12,6 +12,16 @@ properties:
enum: enum:
- m.text - m.text
type: string 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: required:
- msgtype - msgtype
- body - body

Loading…
Cancel
Save