diff --git a/assets/scss/_variables_project.scss b/assets/scss/_variables_project.scss index 1e7e3950..637c0575 100644 --- a/assets/scss/_variables_project.scss +++ b/assets/scss/_variables_project.scss @@ -30,6 +30,9 @@ $note: $secondary; $note-background: $secondary-background; $warning-background: #FFE0E0; +// colours for definition tables. +// the border colour matches that used for "highlight" divs +$table-border-color: rgba(black, .125); $table-row-alternate: $secondary-lightest-background; $table-row-default: $secondary-lighter-background; diff --git a/assets/scss/custom.scss b/assets/scss/custom.scss index 898b9808..5a89d648 100644 --- a/assets/scss/custom.scss +++ b/assets/scss/custom.scss @@ -165,16 +165,10 @@ footer { } -/* Adjust heading anchors for site header */ -.td-content { - &> h2, - &> h3, - &> h4, - &> h5, - &> h6, - .rendered-data h1 { - scroll-margin-top: 5rem; - } +/* Adjust the scroll margin for everything in the main content, so that + * it doesn't disappear behind the header bar */ +.td-content * { + scroll-margin-top: 5.5rem; } /* Styles for the table of contents */ @@ -270,13 +264,13 @@ footer { /* Styles for sections that are rendered from data, such as HTTP APIs and event schemas */ .rendered-data { - margin: 1rem 0 3rem 0; + background-color: $secondary-lightest-background; + padding: 1rem; + margin: 1rem 0; details { summary { padding: .5rem 0; - list-style-position: outside; - p { max-width: 80%; } @@ -342,22 +336,30 @@ footer { padding: 1rem; } - th { - background-color: $white; - } + &.object-table, &.response-table { + border: 1px $table-border-color solid; - caption, tr { - background-color: $table-row-default; - } + caption { + // the caption is outside the table's border box, + // so we have to give it its own border. + border: 1px $table-border-color solid; - tr:nth-child(even) { - background-color: $table-row-alternate; + // ... but avoid double border between caption and table + border-bottom: 0; + } + + caption, tbody tr { + background-color: $table-row-default; + } + + tbody tr:nth-child(even) { + background-color: $table-row-alternate; + } } &.basic-info, &.basic-info th, &.basic-info td { table-layout: fixed; margin: 1rem 0 .5rem 0; - background-color: $white; } &.basic-info th { diff --git a/changelogs/application_service/newsfragments/1200.breaking b/changelogs/application_service/newsfragments/1200.breaking new file mode 100644 index 00000000..8b362072 --- /dev/null +++ b/changelogs/application_service/newsfragments/1200.breaking @@ -0,0 +1 @@ +Replace homeserver authorization approach with an `Authorization` header instead of `access_token` when talking to the application service, as per [MSC2832](https://github.com/matrix-org/matrix-spec-proposals/pull/2832). \ No newline at end of file diff --git a/changelogs/client_server/newsfragments/1196.removal b/changelogs/client_server/newsfragments/1196.removal new file mode 100644 index 00000000..c09a4b0d --- /dev/null +++ b/changelogs/client_server/newsfragments/1196.removal @@ -0,0 +1 @@ +Remove unused policy room sharing mechanism, as per [MSC3844](https://github.com/matrix-org/matrix-spec-proposals/pull/3844). \ No newline at end of file diff --git a/changelogs/client_server/newsfragments/1198.feature b/changelogs/client_server/newsfragments/1198.feature new file mode 100644 index 00000000..4e41e587 --- /dev/null +++ b/changelogs/client_server/newsfragments/1198.feature @@ -0,0 +1 @@ +Copy a room's `type` when upgrading it, as per [MSC3818](https://github.com/matrix-org/matrix-spec-proposals/pull/3818). \ No newline at end of file diff --git a/changelogs/client_server/newsfragments/1199.feature b/changelogs/client_server/newsfragments/1199.feature new file mode 100644 index 00000000..ca32e966 --- /dev/null +++ b/changelogs/client_server/newsfragments/1199.feature @@ -0,0 +1 @@ +Add `room_types` filter and `room_type` response to `/publicRooms`, as per [MSC3827](https://github.com/matrix-org/matrix-spec-proposals/pull/3827). \ No newline at end of file diff --git a/changelogs/client_server/newsfragments/1201.feature b/changelogs/client_server/newsfragments/1201.feature new file mode 100644 index 00000000..4c9a5ea1 --- /dev/null +++ b/changelogs/client_server/newsfragments/1201.feature @@ -0,0 +1 @@ +Add a `.m.rule.room.server_acl` push rule to match `m.room.server_acl` events, as per [MSC3786](https://github.com/matrix-org/matrix-spec-proposals/pull/3786). \ No newline at end of file diff --git a/changelogs/internal/newsfragments/.gitignore b/changelogs/internal/newsfragments/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/changelogs/internal/newsfragments/1191.clarification b/changelogs/internal/newsfragments/1191.clarification new file mode 100644 index 00000000..3c4ca5f6 --- /dev/null +++ b/changelogs/internal/newsfragments/1191.clarification @@ -0,0 +1 @@ +Render HTML anchors for object definition tables. diff --git a/changelogs/internal/newsfragments/1194.feature b/changelogs/internal/newsfragments/1194.feature new file mode 100644 index 00000000..23f23618 --- /dev/null +++ b/changelogs/internal/newsfragments/1194.feature @@ -0,0 +1 @@ +Add internal changes changelog section. \ No newline at end of file diff --git a/changelogs/internal/newsfragments/1195.clarification b/changelogs/internal/newsfragments/1195.clarification new file mode 100644 index 00000000..da9ce6fe --- /dev/null +++ b/changelogs/internal/newsfragments/1195.clarification @@ -0,0 +1 @@ +Give rendered-data sections a background and some padding. diff --git a/content/application-service-api.md b/content/application-service-api.md index 61227660..029e0350 100644 --- a/content/application-service-api.md +++ b/content/application-service-api.md @@ -127,11 +127,27 @@ this. #### Authorization -Homeservers MUST include a query parameter named `access_token` -containing the `hs_token` from the application service's registration -when making requests to the application service. Application services -MUST verify the provided `access_token` matches their known `hs_token`, -failing the request with an `M_FORBIDDEN` error if it does not match. +{{% changed-in v="1.4" %}} + +Homeservers MUST include an `Authorization` header, containing the `hs_token` +from the application service's registration, when making requests to the +application service. Application services MUST verify that the provided +`Bearer` token matches their known `hs_token`, failing the request with +an `M_FORBIDDEN` error if it does not match. + +The format of the `Authorization` header is similar to the [Client-Server API](/client-server-api/#client-authentication): +`Bearer TheHSTokenGoesHere`. + +{{% boxes/note %}} +In previous versions of this specification, an `access_token` query +parameter was used instead. Servers should only send this query parameter +if supporting legacy versions of the specification. + +If sending the `query_string`, it is encouraged to send it alongside +the `Authorization` header for maximum compatibility. + +Application services should ensure both match if both are provided. +{{% /boxes/note %}} #### Legacy routes diff --git a/content/client-server-api/modules/moderation_policies.md b/content/client-server-api/modules/moderation_policies.md index 027edd5d..0f537e11 100644 --- a/content/client-server-api/modules/moderation_policies.md +++ b/content/client-server-api/modules/moderation_policies.md @@ -76,18 +76,6 @@ joining or peeking the room. Joining or peeking is not required, however: an implementation could poll for updates or use a different technique for receiving updates to the policy's rules. -#### Sharing - -In addition to sharing a direct reference to the room which contains the -policy's rules, plain http or https URLs can be used to share links to -the list. When the URL is approached with a `Accept: application/json` -header or has `.json` appended to the end of the URL, it should return a -JSON object containing a `room_uri` property which references the room. -Currently this would be a `matrix.to` URI, however in future it could be -a Matrix-schemed URI instead. When not approached with the intent of -JSON, the service could return a user-friendly page describing what is -included in the ban list. - #### Events The `entity` described by the state events can contain `*` and `?` to diff --git a/content/client-server-api/modules/push.md b/content/client-server-api/modules/push.md index 99150d26..401bcd66 100644 --- a/content/client-server-api/modules/push.md +++ b/content/client-server-api/modules/push.md @@ -522,6 +522,8 @@ Definition: **`.m.rule.room.server_acl`** +{{% added-in v="1.4" %}} + Suppresses notifications for [`m.room.server_acl`](#mroomserver_acl) events. Definition: diff --git a/content/client-server-api/modules/room_upgrades.md b/content/client-server-api/modules/room_upgrades.md index e9794dea..10a575f0 100644 --- a/content/client-server-api/modules/room_upgrades.md +++ b/content/client-server-api/modules/room_upgrades.md @@ -33,8 +33,11 @@ server: 1. Checks that the user has permission to send `m.room.tombstone` events in the room. -2. Creates a replacement room with a `m.room.create` event containing a - `predecessor` field and the applicable `room_version`. +2. {{< changed-in v="1.4" >}} Creates a replacement room with a `m.room.create` event containing a + `predecessor` field, the applicable `room_version`, and a `type` field + which is copied from the `predecessor` room. If no `type` is set on the + previous room, no `type` is specified on the new room's create event + either. 3. Replicates transferable state events to the new room. The exact details for what is transferred is left as an implementation detail, diff --git a/data/api/application-service/definitions/security.yaml b/data/api/application-service/definitions/security.yaml index 6d7edd3a..b28d033a 100644 --- a/data/api/application-service/definitions/security.yaml +++ b/data/api/application-service/definitions/security.yaml @@ -1,4 +1,5 @@ # Copyright 2018 New Vector Ltd +# Copyright 2022 The Matrix.org Foundation C.I.C. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,6 +14,6 @@ # limitations under the License. homeserverAccessToken: type: apiKey - description: The `hs_token` provided by the application service's registration. - name: access_token - in: query + name: Authorization + in: header + description: The `Bearer` `hs_token` provided by the application service's registration. diff --git a/data/api/client-server/definitions/public_rooms_chunk.yaml b/data/api/client-server/definitions/public_rooms_chunk.yaml index ff563a3c..9c6ae6fc 100644 --- a/data/api/client-server/definitions/public_rooms_chunk.yaml +++ b/data/api/client-server/definitions/public_rooms_chunk.yaml @@ -57,6 +57,11 @@ properties: The room's join rule. When not present, the room is assumed to be `public`. example: "public" + room_type: + type: string + x-addedInMatrixVersion: "1.4" + description: |- + The `type` of room (from [`m.room.create`](/client-server-api/#mroomcreate)), if any. required: - room_id - num_joined_members diff --git a/data/api/client-server/definitions/public_rooms_response.yaml b/data/api/client-server/definitions/public_rooms_response.yaml index 23f38eff..ba2b712c 100644 --- a/data/api/client-server/definitions/public_rooms_response.yaml +++ b/data/api/client-server/definitions/public_rooms_response.yaml @@ -62,7 +62,8 @@ example: { "room_id": "!ol19s:bleecker.street", "topic": "Tasty tasty cheese", "world_readable": true, - "join_rule": "public" + "join_rule": "public", + "room_type": "m.space" } ], "next_batch": "p190q", diff --git a/data/api/client-server/list_public_rooms.yaml b/data/api/client-server/list_public_rooms.yaml index b702f1bf..6391bbbd 100644 --- a/data/api/client-server/list_public_rooms.yaml +++ b/data/api/client-server/list_public_rooms.yaml @@ -198,8 +198,18 @@ paths: generic_search_term: type: string description: |- - A string to search for in the room metadata, e.g. name, - topic, canonical alias etc. (Optional). + An optional string to search for in the room metadata, e.g. name, + topic, canonical alias, etc. + room_types: + type: array + x-addedInMatrixVersion: "1.4" + items: + type: string + description: |- + An optional list of [room types](/client-server-api/#types) to search + for. To include rooms without a room type, specify `null` within this + list. When not specified, all applicable rooms (regardless of type) + are returned. include_all_networks: type: boolean description: |- @@ -215,7 +225,8 @@ paths: example: { "limit": 10, "filter": { - "generic_search_term": "foo" + "generic_search_term": "foo", + "room_types": [null, "m.space"] }, "include_all_networks": false, "third_party_instance_id": "irc" diff --git a/data/api/client-server/space_hierarchy.yaml b/data/api/client-server/space_hierarchy.yaml index 91bf67c9..9469d0c1 100644 --- a/data/api/client-server/space_hierarchy.yaml +++ b/data/api/client-server/space_hierarchy.yaml @@ -129,6 +129,7 @@ paths: - type: object title: ChildRoomsChunk properties: + # Override x-addedInMatrixVersion for room_type (this endpoint had it first) room_type: type: string description: |- diff --git a/data/api/server-server/public_rooms.yaml b/data/api/server-server/public_rooms.yaml index ba949bcc..c65a649a 100644 --- a/data/api/server-server/public_rooms.yaml +++ b/data/api/server-server/public_rooms.yaml @@ -110,8 +110,18 @@ paths: generic_search_term: type: string description: |- - A string to search for in the room metadata, e.g. name, - topic, canonical alias etc. (Optional). + An optional string to search for in the room metadata, e.g. name, + topic, canonical alias, etc. + room_types: + type: array + x-addedInMatrixVersion: "1.4" + items: + type: string + description: |- + An optional list of [room types](/client-server-api/#types) to search + for. To include rooms without a room type, specify `null` within this + list. When not specified, all applicable rooms (regardless of type) + are returned. include_all_networks: type: boolean description: |- @@ -127,7 +137,8 @@ paths: example: { "limit": 10, "filter": { - "generic_search_term": "foo" + "generic_search_term": "foo", + "room_types": [null, "m.space"] }, "include_all_networks": false, "third_party_instance_id": "irc" @@ -185,7 +196,8 @@ paths: "room_id": "!ol19s:bleecker.street", "topic": "Tasty tasty cheese", "world_readable": true, - "join_rule": "public" + "join_rule": "public", + "room_type": "m.space" } ], "next_batch": "p190q", diff --git a/layouts/partials/openapi/render-object-table.html b/layouts/partials/openapi/render-object-table.html index 7de88071..b5e332dd 100644 --- a/layouts/partials/openapi/render-object-table.html +++ b/layouts/partials/openapi/render-object-table.html @@ -21,7 +21,7 @@ {{ if $properties }} -
| Status | Description | diff --git a/layouts/shortcodes/changelog/changelog-changes.html b/layouts/shortcodes/changelog/changelog-changes.html index d1d13ba1..99efce08 100644 --- a/layouts/shortcodes/changelog/changelog-changes.html +++ b/layouts/shortcodes/changelog/changelog-changes.html @@ -38,6 +38,7 @@ {{ partial "render-api-changes" (dict "title" "Push Gateway API" "id" "push-gateway-api" "path" (path.Join $path "push_gateway")) }} {{ partial "render-api-changes" (dict "title" "Room Versions" "id" "room-versions" "path" (path.Join $path "room_versions")) }} {{ partial "render-api-changes" (dict "title" "Appendices" "id" "appendices" "path" (path.Join $path "appendices")) }} +{{ partial "render-api-changes" (dict "title" "Internal Changes/Tooling" "id" "internal" "path" (path.Join $path "internal")) }} {{ define "partials/render-api-changes" }}
|---|