Skip to content

Document message formats as-is #1397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/1397.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document message formats on ``m.text`` and ``m.emote`` messages
4 changes: 3 additions & 1 deletion event-schemas/examples/m.room.message#m.emote
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion event-schemas/examples/m.room.message#m.text
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions event-schemas/schema/m.room.message#m.emote
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions event-schemas/schema/m.room.message#m.text
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down