Merge remote-tracking branch 'matrix-org/master' into travis/better-errors

pull/977/head
Travis Ralston 6 years ago
commit 8b513b9f8e

@ -83,6 +83,8 @@ paths:
description: |- description: |-
Get the given user's presence state. Get the given user's presence state.
operationId: getPresence operationId: getPresence
security:
- accessToken: []
parameters: parameters:
- in: path - in: path
type: string type: string
@ -121,6 +123,15 @@ paths:
description: |- description: |-
There is no presence state for this user. This user may not exist or There is no presence state for this user. This user may not exist or
isn't exposing presence information to you. isn't exposing presence information to you.
403:
description: You are not allowed to see this user's presence status.
examples:
application/json: {
"errcode": "M_FORBIDDEN",
"error": "You are not allowed to see their presence"
}
schema:
"$ref": "definitions/error.yaml"
tags: tags:
- Presence - Presence
"/presence/list/{userId}": "/presence/list/{userId}":

@ -35,6 +35,8 @@ Unreleased changes
(`#1274 <https://github.com/matrix-org/matrix-doc/pull/1274>`_). (`#1274 <https://github.com/matrix-org/matrix-doc/pull/1274>`_).
- Document the GET version of ``/login`` - Document the GET version of ``/login``
(`#1361 <https://github.com/matrix-org/matrix-doc/pull/1361>`_). (`#1361 <https://github.com/matrix-org/matrix-doc/pull/1361>`_).
- Document the CORS/preflight headers
(`#1365 <https://github.com/matrix-org/matrix-doc/pull/1365>`_).
- Spec clarifications: - Spec clarifications:
@ -59,6 +61,8 @@ Unreleased changes
(`#1245 <https://github.com/matrix-org/matrix-doc/pull/1244>`_). (`#1245 <https://github.com/matrix-org/matrix-doc/pull/1244>`_).
- Define what a ``RoomEvent`` is on ``/rooms/{roomId}/messages`` - Define what a ``RoomEvent`` is on ``/rooms/{roomId}/messages``
(`#1380 <https://github.com/matrix-org/matrix-doc/pull/1380>`_). (`#1380 <https://github.com/matrix-org/matrix-doc/pull/1380>`_).
- Mark ``GET /presence/{userId}/status`` as requiring authentication
(`#1371 <https://github.com/matrix-org/matrix-doc/pull/1371>`_).
- Describe ``StateEvent`` for ``/createRoom`` - Describe ``StateEvent`` for ``/createRoom``
(`#1329 <https://github.com/matrix-org/matrix-doc/pull/1329>`_). (`#1329 <https://github.com/matrix-org/matrix-doc/pull/1329>`_).
- Describe how the ``reason`` is handled for kicks/bans - Describe how the ``reason`` is handled for kicks/bans

@ -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

@ -164,6 +164,25 @@ recommended.
{{versions_cs_http_api}} {{versions_cs_http_api}}
Web Browser Clients
-------------------
It is realistic to expect that some clients will be written to be run within a
web browser or similar environment. In these cases, the homeserver should respond
to pre-flight requests and supply Cross-Origin Resource Sharing (CORS) headers on
all requests.
When a client approaches the server with a pre-flight (``OPTIONS``) request, the
server should respond with the CORS headers for that route. The recommended CORS
headers to be returned by servers on all requests are:
.. code::
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization
Client Authentication Client Authentication
--------------------- ---------------------

Loading…
Cancel
Save