Skip to content

Commit b166d6c

Browse files
committed
Merge branch 'master' into matthew/msc1849
2 parents 2dde2c1 + ace94f0 commit b166d6c

File tree

176 files changed

+4345
-1469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+4345
-1469
lines changed

.buildkite/pipeline.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ steps:
99
plugins:
1010
- docker#v3.0.1:
1111
image: "python:3.6"
12+
13+
- label: "rebuild matrix.org"
14+
trigger: "matrix-dot-org"
15+
async: true
16+
branches: "master"

CONTRIBUTING.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ For this to be effective, the APIs need to be present and working correctly in a
2626
server before they can be documented in the specification. This process can take
2727
some time to complete.
2828

29-
For this reason, we have not found the github pull-request model effective for
30-
discussing changes to the specification. Instead, we have adopted the workflow
31-
as described at https://matrix.org/docs/spec/proposals - *please read this for
32-
details on how to contribute spec changes*.
29+
Changes to the protocol (new endpoints, ideas, etc) need to go through the
30+
`proposals process <https://matrix.org/docs/spec/proposals>`_. Other changes,
31+
such as fixing bugs, typos, or clarifying existing behaviour do not need a proposal.
32+
If you're not sure, visit us at `#matrix-spec:matrix.org`_
33+
and ask.
3334

3435

3536
Other changes
@@ -51,32 +52,31 @@ following:
5152
<https://github.com/matrix-org/matrix-doc/labels/spec-bug>`_ label.
5253

5354
(If there is any doubt about whether it is the spec or the implementations
54-
that need fixing, please discuss it with us first in `#matrix-dev:matrix.org
55-
<http://matrix.to/#/#matrix-dev:matrix.org>`_.)
55+
that need fixing, please discuss it with us first in `#matrix-spec:matrix.org`_.)
5656

5757
* Clarifications to the specification which do not change the behaviour of
5858
Matrix servers or clients in a way which might introduce compatibility
5959
problems for existing deployments. This includes anything with the
6060
`clarification <https://github.com/matrix-org/matrix-doc/labels/clarification>`_
6161
label.
6262

63-
For example, recommendations for UI behaviour do not require a proposal
64-
document. On the other hand, changes to event contents would be best
65-
discussed in a proposal document even though no changes would be necessary to
66-
server implementations.
63+
For example, areas where the specification is unclear do not require a proposal
64+
to fix. On the other hand, introducing new behaviour is best represented by a
65+
proposal.
6766

68-
For such changes, please do just open a `pull request`_.
67+
For such changes, please do just open a `pull request`_. If you're not sure if
68+
your change is covered by the above, please visit `#matrix-spec:matrix.org` and
69+
ask.
6970

70-
.. _pull request: https://help.github.com/articles/about-pull-requests
71+
.. _`pull request`: https://help.github.com/articles/about-pull-requests
72+
.. _`#matrix-spec:matrix.org`: https://matrix.to/#/#matrix-spec:matrix.org
7173

7274

7375
Adding to the changelog
7476
~~~~~~~~~~~~~~~~~~~~~~~
7577

76-
Currently only changes to the client-server API need to end up in a changelog. The
77-
other APIs are not yet stable and therefore do not have a changelog. Adding to the
78-
changelog can only be done after you've opened your pull request, so be sure to do
79-
that first.
78+
All API specifications require a changelog entry. Adding to the changelog can only
79+
be done after you've opened your pull request, so be sure to do that first.
8080

8181
The changelog is managed by Towncrier (https://github.com/hawkowl/towncrier) in the
8282
form of "news fragments". The news fragments for the client-server API are stored
@@ -96,7 +96,7 @@ the ``newsfragments`` directory. The ``type`` can be one of the following:
9696

9797
* ``breaking`` - Used when the change is not backwards compatible.
9898

99-
* ``deprecation`` - Used when deprecating something
99+
* ``deprecation`` - Used when deprecating something.
100100

101101
All news fragments must have a brief summary explaining the change in the
102102
contents of the file. The summary must end in a full stop to be in line with

api/application-service/transactions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ paths:
5656
example: {
5757
"events": [
5858
{"$ref": "../../event-schemas/examples/m.room.member"},
59-
{"$ref": "../../event-schemas/examples/m.room.message#m.text"}
59+
{"$ref": "../../event-schemas/examples/m.room.message$m.text"}
6060
]
6161
}
6262
description: Transaction information

api/client-server/administrative_contact.yaml

Lines changed: 73 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,27 @@ paths:
134134
200:
135135
description: The addition was successful.
136136
examples:
137-
application/json: {}
137+
application/json: {
138+
"submit_url": "https://example.org/path/to/submitToken"
139+
}
138140
schema:
139141
type: object
142+
properties:
143+
submit_url:
144+
type: string
145+
description: |-
146+
An optional field containing a URL where the client must
147+
submit the validation token to, with identical parameters
148+
to the Identity Service API's ``POST
149+
/validate/email/submitToken`` endpoint. The homeserver must
150+
send this token to the user (if applicable), who should
151+
then be prompted to provide it to the client.
152+
153+
If this field is not present, the client can assume that
154+
verification will happen without the client's involvement
155+
provided the homeserver advertises this specification version
156+
in the ``/versions`` response (ie: r0.5.0).
157+
example: "https://example.org/path/to/submitToken"
140158
403:
141159
description: The credentials could not be verified with the identity server.
142160
examples:
@@ -163,6 +181,14 @@ paths:
163181
schema:
164182
type: object
165183
properties:
184+
id_server:
185+
type: string
186+
description: |-
187+
The identity server to unbind from. If not provided, the homeserver
188+
MUST use the ``id_server`` the identifier was added through. If the
189+
homeserver does not know the original ``id_server``, it MUST return
190+
a ``id_server_unbind_result`` of ``no-support``.
191+
example: "example.org"
166192
medium:
167193
type: string
168194
description: The medium of the third party identifier being removed.
@@ -180,41 +206,55 @@ paths:
180206
user.
181207
schema:
182208
type: object
183-
properties: {}
209+
properties:
210+
id_server_unbind_result:
211+
type: string
212+
enum:
213+
# XXX: I don't know why, but the order matters here so that "no-support"
214+
# doesn't become "no- support" by the renderer.
215+
- "no-support"
216+
- "success"
217+
description: |-
218+
An indicator as to whether or not the homeserver was able to unbind
219+
the 3PID from the identity server. ``success`` indicates that the
220+
indentity server has unbound the identifier whereas ``no-support``
221+
indicates that the identity server refuses to support the request
222+
or the homeserver was not able to determine an identity server to
223+
unbind from.
224+
example: "success"
225+
required:
226+
- id_server_unbind_result
184227
tags:
185228
- User data
186229
"/account/3pid/email/requestToken":
187230
post:
188231
summary: Begins the validation process for an email address for association with the user's account.
189232
description: |-
190-
Proxies the Identity Service API ``validate/email/requestToken``, but
191-
first checks that the given email address is **not** already associated
192-
with an account on this homeserver. This API should be used to request
193-
validation tokens when adding an email address to an account. This API's
194-
parameters and response are identical to that of the |/register/email/requestToken|_
195-
endpoint.
233+
The homeserver must check that the given email address is **not**
234+
already associated with an account on this homeserver. This API should
235+
be used to request validation tokens when adding an email address to an
236+
account. This API's parameters and response are identical to that of
237+
the |/register/email/requestToken|_ endpoint. The homeserver has the
238+
choice of validating the email address itself, or proxying the request
239+
to the ``/validate/email/requestToken`` Identity Service API as
240+
identified by ``id_server``. It is imperative that the
241+
homeserver keep a list of trusted Identity Servers and only proxies to
242+
those that it trusts.
196243
operationId: requestTokenTo3PIDEmail
197244
parameters:
198245
- in: body
199246
name: body
200247
required: true
201248
schema:
202-
allOf:
203-
- $ref: "../identity/definitions/request_email_validation.yaml"
204-
- type: object
205-
properties:
206-
id_server:
207-
type: string
208-
description: |-
209-
The hostname of the identity server to communicate with. May
210-
optionally include a port.
211-
example: "id.example.com"
212-
required: ['id_server']
249+
$ref: "./definitions/request_email_validation.yaml"
213250
responses:
214251
200:
215-
description: An email was sent to the given address.
252+
description: |-
253+
An email was sent to the given address. Note that this may be an
254+
email containing the validation token or it may be informing the
255+
user of an error.
216256
schema:
217-
$ref: "../identity/definitions/sid.yaml"
257+
$ref: "definitions/request_token_response.yaml"
218258
403:
219259
description: |-
220260
The homeserver does not allow the third party identifier as a
@@ -241,34 +281,28 @@ paths:
241281
post:
242282
summary: Begins the validation process for a phone number for association with the user's account.
243283
description: |-
244-
Proxies the Identity Service API ``validate/msisdn/requestToken``, but
245-
first checks that the given phone number is **not** already associated
246-
with an account on this homeserver. This API should be used to request
247-
validation tokens when adding a phone number to an account. This API's
248-
parameters and response are identical to that of the |/register/msisdn/requestToken|_
249-
endpoint.
284+
The homeserver must check that the given phone number is **not**
285+
already associated with an account on this homeserver. This API should
286+
be used to request validation tokens when adding a phone number to an
287+
account. This API's parameters and response are identical to that of
288+
the |/register/msisdn/requestToken|_ endpoint. The homeserver has the
289+
choice of validating the phone number itself, or proxying the request
290+
to the ``/validate/msisdn/requestToken`` Identity Service API as
291+
identified by ``id_server``. It is imperative that the
292+
homeserver keep a list of trusted Identity Servers and only proxies to
293+
those that it trusts.
250294
operationId: requestTokenTo3PIDMSISDN
251295
parameters:
252296
- in: body
253297
name: body
254298
required: true
255299
schema:
256-
allOf:
257-
- $ref: "../identity/definitions/request_msisdn_validation.yaml"
258-
- type: object
259-
properties:
260-
id_server:
261-
type: string
262-
description: |-
263-
The hostname of the identity server to communicate with. May
264-
optionally include a port.
265-
example: "id.example.com"
266-
required: ['id_server']
300+
$ref: "./definitions/request_msisdn_validation.yaml"
267301
responses:
268302
200:
269303
description: An SMS message was sent to the given phone number.
270304
schema:
271-
$ref: "../identity/definitions/sid.yaml"
305+
$ref: "definitions/request_token_response.yaml"
272306
403:
273307
description: |-
274308
The homeserver does not allow the third party identifier as a

0 commit comments

Comments
 (0)