Skip to content

Commit 808a82e

Browse files
authored
Merge pull request #1397 from turt2live/travis/text-format
Document message formats as-is
2 parents c79010f + c999b7c commit 808a82e

File tree

5 files changed

+27
-2
lines changed

5 files changed

+27
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Document message formats on ``m.text`` and ``m.emote`` messages

event-schemas/examples/m.room.message#m.emote

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"age": 242352,
33
"content": {
44
"body": "thinks this is an example emote",
5-
"msgtype": "m.emote"
5+
"msgtype": "m.emote",
6+
"format": "org.matrix.custom.html",
7+
"formatted_body": "thinks <b>this</b> is an example emote"
68
},
79
"origin_server_ts": 1431961217939,
810
"event_id": "$WLGTSEFSEF:localhost",

event-schemas/examples/m.room.message#m.text

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"age": 242352,
33
"content": {
44
"body": "This is an example text message",
5-
"msgtype": "m.text"
5+
"msgtype": "m.text",
6+
"format": "org.matrix.custom.html",
7+
"formatted_body": "<b>This is an example text message</b>"
68
},
79
"origin_server_ts": 1431961217939,
810
"event_id": "$WLGTSEFSEF:localhost",

event-schemas/schema/m.room.message#m.emote

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ properties:
1212
enum:
1313
- m.emote
1414
type: string
15+
format:
16+
description: |-
17+
The format used in the ``formatted_body``. Currently only
18+
``org.matrix.custom.html`` is supported.
19+
type: string
20+
formatted_body:
21+
description: |-
22+
The formatted version of the ``body``. This is required if ``format``
23+
is specified.
24+
type: string
1525
required:
1626
- msgtype
1727
- body

event-schemas/schema/m.room.message#m.text

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ properties:
1212
enum:
1313
- m.text
1414
type: string
15+
format:
16+
description: |-
17+
The format used in the ``formatted_body``. Currently only
18+
``org.matrix.custom.html`` is supported.
19+
type: string
20+
formatted_body:
21+
description: |-
22+
The formatted version of the ``body``. This is required if ``format``
23+
is specified.
24+
type: string
1525
required:
1626
- msgtype
1727
- body

0 commit comments

Comments
 (0)