Merge branch 'main' into travis/corp-headers

This commit is contained in:
Travis Ralston 2022-08-08 19:01:27 -06:00
commit f87e751211
26 changed files with 110 additions and 55 deletions

View file

@ -30,6 +30,9 @@ $note: $secondary;
$note-background: $secondary-background; $note-background: $secondary-background;
$warning-background: #FFE0E0; $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-alternate: $secondary-lightest-background;
$table-row-default: $secondary-lighter-background; $table-row-default: $secondary-lighter-background;

View file

@ -165,16 +165,10 @@ footer {
} }
/* Adjust heading anchors for site header */ /* Adjust the scroll margin for everything in the main content, so that
.td-content { * it doesn't disappear behind the header bar */
&> h2, .td-content * {
&> h3, scroll-margin-top: 5.5rem;
&> h4,
&> h5,
&> h6,
.rendered-data h1 {
scroll-margin-top: 5rem;
}
} }
/* Styles for the table of contents */ /* 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 */ /* Styles for sections that are rendered from data, such as HTTP APIs and event schemas */
.rendered-data { .rendered-data {
margin: 1rem 0 3rem 0; background-color: $secondary-lightest-background;
padding: 1rem;
margin: 1rem 0;
details { details {
summary { summary {
padding: .5rem 0; padding: .5rem 0;
list-style-position: outside;
p { p {
max-width: 80%; max-width: 80%;
} }
@ -342,22 +336,30 @@ footer {
padding: 1rem; padding: 1rem;
} }
th { &.object-table, &.response-table {
background-color: $white; border: 1px $table-border-color solid;
}
caption, tr { caption {
background-color: $table-row-default; // 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) { // ... but avoid double border between caption and table
background-color: $table-row-alternate; 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 { &.basic-info, &.basic-info th, &.basic-info td {
table-layout: fixed; table-layout: fixed;
margin: 1rem 0 .5rem 0; margin: 1rem 0 .5rem 0;
background-color: $white;
} }
&.basic-info th { &.basic-info th {

View file

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

View file

@ -0,0 +1 @@
Remove unused policy room sharing mechanism, as per [MSC3844](https://github.com/matrix-org/matrix-spec-proposals/pull/3844).

View file

@ -0,0 +1 @@
Copy a room's `type` when upgrading it, as per [MSC3818](https://github.com/matrix-org/matrix-spec-proposals/pull/3818).

View file

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

View file

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

View file

View file

@ -0,0 +1 @@
Render HTML anchors for object definition tables.

View file

@ -0,0 +1 @@
Add internal changes changelog section.

View file

@ -0,0 +1 @@
Give rendered-data sections a background and some padding.

View file

@ -127,11 +127,27 @@ this.
#### Authorization #### Authorization
Homeservers MUST include a query parameter named `access_token` {{% changed-in v="1.4" %}}
containing the `hs_token` from the application service's registration
when making requests to the application service. Application services Homeservers MUST include an `Authorization` header, containing the `hs_token`
MUST verify the provided `access_token` matches their known `hs_token`, from the application service's registration, when making requests to the
failing the request with an `M_FORBIDDEN` error if it does not match. 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 #### Legacy routes

View file

@ -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 however: an implementation could poll for updates or use a different
technique for receiving updates to the policy's rules. 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 #### Events
The `entity` described by the state events can contain `*` and `?` to The `entity` described by the state events can contain `*` and `?` to

View file

@ -522,6 +522,8 @@ Definition:
**`.m.rule.room.server_acl`** **`.m.rule.room.server_acl`**
{{% added-in v="1.4" %}}
Suppresses notifications for [`m.room.server_acl`](#mroomserver_acl) events. Suppresses notifications for [`m.room.server_acl`](#mroomserver_acl) events.
Definition: Definition:

View file

@ -33,8 +33,11 @@ server:
1. Checks that the user has permission to send `m.room.tombstone` 1. Checks that the user has permission to send `m.room.tombstone`
events in the room. events in the room.
2. Creates a replacement room with a `m.room.create` event containing a 2. {{< changed-in v="1.4" >}} Creates a replacement room with a `m.room.create` event containing a
`predecessor` field and the applicable `room_version`. `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 3. Replicates transferable state events to the new room. The exact
details for what is transferred is left as an implementation detail, details for what is transferred is left as an implementation detail,

View file

@ -1,4 +1,5 @@
# Copyright 2018 New Vector Ltd # Copyright 2018 New Vector Ltd
# Copyright 2022 The Matrix.org Foundation C.I.C.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -13,6 +14,6 @@
# limitations under the License. # limitations under the License.
homeserverAccessToken: homeserverAccessToken:
type: apiKey type: apiKey
description: The `hs_token` provided by the application service's registration. name: Authorization
name: access_token in: header
in: query description: The `Bearer` `hs_token` provided by the application service's registration.

View file

@ -57,6 +57,11 @@ properties:
The room's join rule. When not present, the room is assumed to The room's join rule. When not present, the room is assumed to
be `public`. be `public`.
example: "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: required:
- room_id - room_id
- num_joined_members - num_joined_members

View file

@ -62,7 +62,8 @@ example: {
"room_id": "!ol19s:bleecker.street", "room_id": "!ol19s:bleecker.street",
"topic": "Tasty tasty cheese", "topic": "Tasty tasty cheese",
"world_readable": true, "world_readable": true,
"join_rule": "public" "join_rule": "public",
"room_type": "m.space"
} }
], ],
"next_batch": "p190q", "next_batch": "p190q",

View file

@ -198,8 +198,18 @@ paths:
generic_search_term: generic_search_term:
type: string type: string
description: |- description: |-
A string to search for in the room metadata, e.g. name, An optional string to search for in the room metadata, e.g. name,
topic, canonical alias etc. (Optional). 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: include_all_networks:
type: boolean type: boolean
description: |- description: |-
@ -215,7 +225,8 @@ paths:
example: { example: {
"limit": 10, "limit": 10,
"filter": { "filter": {
"generic_search_term": "foo" "generic_search_term": "foo",
"room_types": [null, "m.space"]
}, },
"include_all_networks": false, "include_all_networks": false,
"third_party_instance_id": "irc" "third_party_instance_id": "irc"

View file

@ -129,6 +129,7 @@ paths:
- type: object - type: object
title: ChildRoomsChunk title: ChildRoomsChunk
properties: properties:
# Override x-addedInMatrixVersion for room_type (this endpoint had it first)
room_type: room_type:
type: string type: string
description: |- description: |-

View file

@ -110,8 +110,18 @@ paths:
generic_search_term: generic_search_term:
type: string type: string
description: |- description: |-
A string to search for in the room metadata, e.g. name, An optional string to search for in the room metadata, e.g. name,
topic, canonical alias etc. (Optional). 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: include_all_networks:
type: boolean type: boolean
description: |- description: |-
@ -127,7 +137,8 @@ paths:
example: { example: {
"limit": 10, "limit": 10,
"filter": { "filter": {
"generic_search_term": "foo" "generic_search_term": "foo",
"room_types": [null, "m.space"]
}, },
"include_all_networks": false, "include_all_networks": false,
"third_party_instance_id": "irc" "third_party_instance_id": "irc"
@ -185,7 +196,8 @@ paths:
"room_id": "!ol19s:bleecker.street", "room_id": "!ol19s:bleecker.street",
"topic": "Tasty tasty cheese", "topic": "Tasty tasty cheese",
"world_readable": true, "world_readable": true,
"join_rule": "public" "join_rule": "public",
"room_type": "m.space"
} }
], ],
"next_batch": "p190q", "next_batch": "p190q",

View file

@ -21,7 +21,7 @@
{{ if $properties }} {{ if $properties }}
<table{{ if .anchor }} id="{{ .anchor }}"{{ end }}> <table{{ if .anchor }} id="{{ .anchor }}"{{ end }} class="object-table">
{{ with $title }} {{ with $title }}
<caption>{{ . }}</caption> <caption>{{ . }}</caption>
{{ end }} {{ end }}

View file

@ -20,7 +20,7 @@
<h2>Responses</h2> <h2>Responses</h2>
<table class> <table class="response-table">
<thead> <thead>
<th class="col-status">Status</th> <th class="col-status">Status</th>
<th class="col-status-description">Description</th> <th class="col-status-description">Description</th>

View file

@ -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" "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" "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" "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" }} {{ define "partials/render-api-changes" }}
<h3 id="{{.id}}">{{ .title }}</h3> <h3 id="{{.id}}">{{ .title }}</h3>

View file

@ -30,7 +30,7 @@
{{ $definition = partial "json-schema/resolve-refs" (dict "schema" $definition "path" $path) }} {{ $definition = partial "json-schema/resolve-refs" (dict "schema" $definition "path" $path) }}
{{ $definition = partial "json-schema/resolve-allof" $definition }} {{ $definition = partial "json-schema/resolve-allof" $definition }}
<section class="rendered-data definition"> <section class="rendered-data definition" id="{{ anchorize $definition.title }}">
<details {{ if not $compact }}open{{ end }}> <details {{ if not $compact }}open{{ end }}>
<summary> <summary>

View file

@ -12,6 +12,7 @@ cd changelogs
rm -f rendered.* rm -f rendered.*
# Reversed order so that room versions ends up on the bottom # Reversed order so that room versions ends up on the bottom
towncrier --name "Internal Changes/Tooling" --dir "./internal" --config "./pyproject.toml" --yes
towncrier --name "Appendices" --dir "./appendices" --config "./pyproject.toml" --yes towncrier --name "Appendices" --dir "./appendices" --config "./pyproject.toml" --yes
towncrier --name "Room Versions" --dir "./room_versions" --config "./pyproject.toml" --yes towncrier --name "Room Versions" --dir "./room_versions" --config "./pyproject.toml" --yes
towncrier --name "Push Gateway API" --dir "./push_gateway" --config "./pyproject.toml" --yes towncrier --name "Push Gateway API" --dir "./push_gateway" --config "./pyproject.toml" --yes