mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-05-01 14:44:09 +02:00
Compare commits
36 commits
ba162dfcfd
...
3b9253da9a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b9253da9a | ||
|
|
fafd11f809 | ||
|
|
486a8f8764 | ||
|
|
e3ca1ba2b8 | ||
|
|
4f0eba6355 | ||
|
|
8fb380d465 | ||
|
|
754e9c82b8 | ||
|
|
86675ad4a4 | ||
|
|
49fec082f5 | ||
|
|
0cc8ee38d5 | ||
|
|
af1e9382ca | ||
|
|
84b5e98f25 | ||
|
|
0cf8fca4da | ||
|
|
bccbff878d | ||
|
|
308bcfd20e | ||
|
|
1f5d598754 | ||
|
|
59c7282ddb | ||
|
|
f49668d722 | ||
|
|
1c2e58d66f | ||
|
|
de25ba5265 | ||
|
|
e9a29f27dc | ||
|
|
2fd3c28a7a | ||
|
|
15f36d1934 | ||
|
|
9edb9b3e5b | ||
|
|
94fca47a7d | ||
|
|
a56969149f | ||
|
|
72205be3dc | ||
|
|
8e383835b9 | ||
|
|
92b7e714e7 | ||
|
|
6f05c2c78e | ||
|
|
9a1b7ffa7c | ||
|
|
e679a00720 | ||
|
|
7dfd746e06 | ||
|
|
77f7e8104a | ||
|
|
b3d4f9a96e | ||
|
|
fdd2a9abe8 |
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
|
@ -236,6 +236,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
tar -C "spec${baseURL}" --strip-components=1 -xzf openapi.tar.gz
|
tar -C "spec${baseURL}" --strip-components=1 -xzf openapi.tar.gz
|
||||||
|
|
||||||
|
- name: "🔍 pagefind indexing"
|
||||||
|
run: |
|
||||||
|
npm run pagefind -- --site "spec${baseURL}"
|
||||||
|
|
||||||
- name: "📦 Tarball creation"
|
- name: "📦 Tarball creation"
|
||||||
run: |
|
run: |
|
||||||
cd spec
|
cd spec
|
||||||
|
|
|
||||||
12
README.md
12
README.md
|
|
@ -79,6 +79,18 @@ We use a highly customized [Docsy](https://www.docsy.dev/) theme for our generat
|
||||||
Awesome. If you're looking at making design-related changes to the spec site, please coordinate with us in
|
Awesome. If you're looking at making design-related changes to the spec site, please coordinate with us in
|
||||||
[#matrix-docs:matrix.org](https://matrix.to/#/#matrix-docs:matrix.org) before opening a PR.
|
[#matrix-docs:matrix.org](https://matrix.to/#/#matrix-docs:matrix.org) before opening a PR.
|
||||||
|
|
||||||
|
## Page search
|
||||||
|
|
||||||
|
The spec uses [Pagefind](https://pagefind.app/) to provide a page search widget. To test this locally, you'll need to generate the
|
||||||
|
search index _after_ building the static site.
|
||||||
|
|
||||||
|
```
|
||||||
|
hugo build && npm run pagefind -- --site public && hugo serve
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that while `hugo serve` supports hot reloading, changes made to the site content won't reflect in the search index without
|
||||||
|
rebuilding it.
|
||||||
|
|
||||||
## Building the specification
|
## Building the specification
|
||||||
|
|
||||||
If for some reason you're not a CI/CD system and want to render a static version of the spec for yourself, follow the above
|
If for some reason you're not a CI/CD system and want to render a static version of the spec for yourself, follow the above
|
||||||
|
|
|
||||||
290
assets/js/offline-search.js
Normal file
290
assets/js/offline-search.js
Normal file
|
|
@ -0,0 +1,290 @@
|
||||||
|
/*
|
||||||
|
Copyright 2026 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.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Adapted from [1] to combine Docsy's built-in search UI with the Pagefind
|
||||||
|
search backend.
|
||||||
|
|
||||||
|
[1]: https://github.com/matrix-org/docsy/blob/71d103ebb20ace3d528178c4b6d92b6cc4f7fd53/assets/js/offline-search.js
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function ($) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
$(document).ready(async function () {
|
||||||
|
// This is going to be loaded from ${deployment}/js/main.js so to use a relative path
|
||||||
|
// to the Pagefind script we need to navigate one level up.
|
||||||
|
const pagefind = await import("../pagefind/pagefind.js");
|
||||||
|
const $searchInput = $(".td-search input");
|
||||||
|
|
||||||
|
//
|
||||||
|
// Lazily initialise Pagefind only when the user is about to start a search.
|
||||||
|
//
|
||||||
|
|
||||||
|
$searchInput.focus(() => {
|
||||||
|
pagefind.init();
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
// Set up search input handler.
|
||||||
|
//
|
||||||
|
|
||||||
|
$searchInput.on("keypress", (event) => {
|
||||||
|
// Start searching only upon Enter.
|
||||||
|
if (event.which === 13) {
|
||||||
|
event.preventDefault();
|
||||||
|
render($(event.target));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Prevent reloading page by enter key on sidebar search.
|
||||||
|
$searchInput.closest("form").on("submit", () => {
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
// Callback for searching and rendering the results.
|
||||||
|
//
|
||||||
|
|
||||||
|
const render = async ($targetSearchInput) => {
|
||||||
|
//
|
||||||
|
// Dispose any existing popover.
|
||||||
|
//
|
||||||
|
|
||||||
|
disposePopover($targetSearchInput);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check if we need to do a search at all.
|
||||||
|
//
|
||||||
|
|
||||||
|
const searchQuery = $targetSearchInput.val();
|
||||||
|
if (searchQuery === "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Prepare the results popover.
|
||||||
|
//
|
||||||
|
|
||||||
|
const $html = $("<div>");
|
||||||
|
|
||||||
|
// Add the header and close button.
|
||||||
|
$html.append($("<div>")
|
||||||
|
.css({
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
marginBottom: "1em",
|
||||||
|
})
|
||||||
|
.append($("<span>")
|
||||||
|
.text("Search results")
|
||||||
|
.css({ fontWeight: "bold" }))
|
||||||
|
.append($("<button>")
|
||||||
|
.addClass("td-offline-search-results__close-button")
|
||||||
|
.addClass("btn")
|
||||||
|
.addClass("btn-sm")
|
||||||
|
.addClass("btn-link")
|
||||||
|
.attr("type", "button")
|
||||||
|
.attr("aria-label", "Close")
|
||||||
|
.on("click", () => {
|
||||||
|
$targetSearchInput.val("");
|
||||||
|
disposePopover($targetSearchInput);
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Add the main search results body.
|
||||||
|
const $searchResultBody = $("<div>").css({
|
||||||
|
maxHeight: `calc(100vh - ${
|
||||||
|
$targetSearchInput.offset().top - $(window).scrollTop() + 180
|
||||||
|
}px)`,
|
||||||
|
overflowY: "auto",
|
||||||
|
});
|
||||||
|
$html.append($searchResultBody);
|
||||||
|
|
||||||
|
// Append a spinner while we're busy.
|
||||||
|
const $spinner = createSpinner();
|
||||||
|
$searchResultBody.append($spinner)
|
||||||
|
|
||||||
|
// Display the popover.
|
||||||
|
const popover = new bootstrap.Popover($targetSearchInput[0], {
|
||||||
|
content: $html[0],
|
||||||
|
html: true,
|
||||||
|
customClass: "td-offline-search-results",
|
||||||
|
placement: "bottom",
|
||||||
|
});
|
||||||
|
popover.show();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Kick off the search, load the results and inject them into the popover.
|
||||||
|
//
|
||||||
|
|
||||||
|
const search = await pagefind.debouncedSearch(searchQuery);
|
||||||
|
if (search === null) {
|
||||||
|
// A more recent search call has been made, nothing to do.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (search.results.length === 0) {
|
||||||
|
$searchResultBody.append(
|
||||||
|
$("<p>").text(`No results found for query "${searchQuery}"`)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
await loadAndRenderResults(search.results, 0, $spinner, $searchResultBody);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Helpers
|
||||||
|
//
|
||||||
|
|
||||||
|
const disposePopover = ($targetSearchInput) => {
|
||||||
|
const popover = bootstrap.Popover.getInstance($targetSearchInput[0]);
|
||||||
|
if (popover !== null) {
|
||||||
|
popover.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const createSpinner = () => {
|
||||||
|
return $("<div>")
|
||||||
|
.addClass("spinner-container")
|
||||||
|
.append($("<div>")
|
||||||
|
.addClass("spinner-border")
|
||||||
|
.attr("role", "status")
|
||||||
|
.append($("<div>")
|
||||||
|
.addClass("visually-hidden")
|
||||||
|
.text("Loading...")))
|
||||||
|
.append($("<p>")
|
||||||
|
.text("Loading..."));
|
||||||
|
}
|
||||||
|
|
||||||
|
const loadAndRenderResults = async (results, offset, $spinner, $searchResultBody) => {
|
||||||
|
// Load and render the first three results and hide the remainder behind a
|
||||||
|
// button to not freeze the browser by loading results that may not be
|
||||||
|
// displayed.
|
||||||
|
const LIMIT = 3;
|
||||||
|
|
||||||
|
for (const [index, result] of results.entries()) {
|
||||||
|
if (index < LIMIT) {
|
||||||
|
// Insert a container for the result *before* the spinner. This
|
||||||
|
// will push down the spinner as new content is loaded and keep
|
||||||
|
// it at the end of the popover.
|
||||||
|
const $container = $("<div>");
|
||||||
|
$spinner.before($container);
|
||||||
|
|
||||||
|
renderResult(await result.data(), index + offset, $container);
|
||||||
|
} else if (index === LIMIT) {
|
||||||
|
const num_hidden_results = results.length - index;
|
||||||
|
const $loader = $("<button>")
|
||||||
|
.attr("type", "button")
|
||||||
|
.addClass("td-offline-search-results__expander-button")
|
||||||
|
.addClass("btn")
|
||||||
|
.addClass("btn-sm")
|
||||||
|
.addClass("btn-link")
|
||||||
|
.text(`Load more results from ${num_hidden_results} other ${pagesString(num_hidden_results)}`)
|
||||||
|
.on("click", async () => {
|
||||||
|
// Remove the button.
|
||||||
|
$loader.remove();
|
||||||
|
|
||||||
|
// Add a spinner while we're busy.
|
||||||
|
const $spinner = createSpinner();
|
||||||
|
$searchResultBody.append($spinner)
|
||||||
|
|
||||||
|
// Load and render the results.
|
||||||
|
await loadAndRenderResults(results.slice(LIMIT), LIMIT + offset, $spinner, $searchResultBody);
|
||||||
|
});
|
||||||
|
$spinner.before($loader)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove the spinner now that everything was loaded.
|
||||||
|
$spinner.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
const renderResult = (data, index, $container) => {
|
||||||
|
// Add the main result's page title.
|
||||||
|
$container.append($("<div>")
|
||||||
|
.append($("<a>")
|
||||||
|
.css({
|
||||||
|
fontSize: "1.2rem",
|
||||||
|
})
|
||||||
|
.attr("href", data.url)
|
||||||
|
.text(data.meta.title))
|
||||||
|
.append($("<span>")
|
||||||
|
.addClass("text-body-secondary")
|
||||||
|
.text(` – ${data.sub_results.length} ${resultsString(data.sub_results.length)}`)));
|
||||||
|
|
||||||
|
// Render the first 3 subresults per page and wrap the rest
|
||||||
|
// in a collapsed container.
|
||||||
|
const LIMIT = 3;
|
||||||
|
let $wrapper = null;
|
||||||
|
|
||||||
|
data.sub_results.forEach((s, index_s) => {
|
||||||
|
if (index_s === LIMIT) {
|
||||||
|
const num_hidden_results = data.sub_results.length - index_s;
|
||||||
|
const wrapper_id = `collapsible-subresults-${index}`;
|
||||||
|
const $action = $("<span>").text("▶ Show");
|
||||||
|
const $expander = $("<button>")
|
||||||
|
.attr("data-bs-toggle", "collapse")
|
||||||
|
.attr("data-bs-target", `#${wrapper_id}`)
|
||||||
|
.attr("aria-expanded", "false")
|
||||||
|
.attr("aria-controls", wrapper_id)
|
||||||
|
.attr("type", "button")
|
||||||
|
.addClass("td-offline-search-results__expander-button")
|
||||||
|
.addClass("btn")
|
||||||
|
.addClass("btn-sm")
|
||||||
|
.addClass("btn-link")
|
||||||
|
.append($action)
|
||||||
|
.append($("<span>").text(` ${num_hidden_results} more ${resultsString(num_hidden_results)} from ${data.meta.title}`));
|
||||||
|
|
||||||
|
$container.append($("<p>").append($expander));
|
||||||
|
$wrapper = $("<div>")
|
||||||
|
.addClass("collapse td-offline-search-results__subresults")
|
||||||
|
.attr("id", wrapper_id)
|
||||||
|
.on("hide.bs.collapse", _ => $action.text("▶ Show"))
|
||||||
|
.on("show.bs.collapse", _ => $action.text("▼ Hide"));
|
||||||
|
$container.append($wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
const $entry = $("<div>")
|
||||||
|
.css("margin-top", "0.5rem");
|
||||||
|
|
||||||
|
$entry.append(
|
||||||
|
$("<a>")
|
||||||
|
.addClass("d-block")
|
||||||
|
.attr("href", s.url)
|
||||||
|
.text(s.title)
|
||||||
|
);
|
||||||
|
|
||||||
|
$entry.append($("<p>").html(s.excerpt));
|
||||||
|
|
||||||
|
if (index_s < LIMIT) {
|
||||||
|
$container.append($entry);
|
||||||
|
} else {
|
||||||
|
$wrapper.append($entry);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const resultsString = (n) => {
|
||||||
|
return n === 1 ? "result" : "results";
|
||||||
|
};
|
||||||
|
|
||||||
|
const pagesString = (n) => {
|
||||||
|
return n === 1 ? "page" : "pages";
|
||||||
|
};
|
||||||
|
|
@ -661,3 +661,32 @@ dd {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Style for the page search widget */
|
||||||
|
.td-offline-search-results {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 460px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.td-offline-search-results .td-offline-search-results__subresults.collapse.show {
|
||||||
|
// Prevent the first child margin from collapsing upward when Bootstrap
|
||||||
|
// finishes the collapse animation, which otherwise causes a small jump.
|
||||||
|
display: flow-root;
|
||||||
|
}
|
||||||
|
|
||||||
|
.td-offline-search-results .spinner-container {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.td-offline-search-results__close-button {
|
||||||
|
// Prevent the label from rendering white on white.
|
||||||
|
--bs-btn-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.td-offline-search-results__expander-button {
|
||||||
|
// Prevent the label from rendering white on white.
|
||||||
|
--bs-btn-color: unset;
|
||||||
|
// Avoid any extra inset.
|
||||||
|
--bs-btn-padding-x: 0;
|
||||||
|
--bs-btn-padding-y: 0;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Clarify formats of string types.
|
||||||
1
changelogs/internal/newsfragments/2331.feature
Normal file
1
changelogs/internal/newsfragments/2331.feature
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Add page search widget.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Clarify how multiple signatures should be handled during signature verification. Contributed by @nexy7574.
|
||||||
|
|
@ -66,6 +66,7 @@ description = "Home of the Matrix specification for decentralised communication"
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
copyright = "The Matrix.org Foundation C.I.C."
|
copyright = "The Matrix.org Foundation C.I.C."
|
||||||
|
offlineSearch = true
|
||||||
|
|
||||||
[params.version]
|
[params.version]
|
||||||
# must be one of "unstable", "current", "historical"
|
# must be one of "unstable", "current", "historical"
|
||||||
|
|
@ -151,7 +152,10 @@ sidebar_menu_compact = true
|
||||||
[server.headers.values]
|
[server.headers.values]
|
||||||
# `style-src 'unsafe-inline'` is needed to correctly render the maths in the Olm spec:
|
# `style-src 'unsafe-inline'` is needed to correctly render the maths in the Olm spec:
|
||||||
# https://github.com/KaTeX/KaTeX/issues/4096
|
# https://github.com/KaTeX/KaTeX/issues/4096
|
||||||
Content-Security-Policy = "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; img-src 'self' data:; connect-src 'self'; font-src 'self' data:; media-src 'self'; child-src 'self'; form-action 'self'; object-src 'self'"
|
# `script-src 'unsafe-eval'` is needed because Pagefind relies on it to load its Wasm.
|
||||||
|
# In future, we should switch to `wasm-unsafe-eval` but this doesn't yet work in Safari:
|
||||||
|
# https://github.com/Pagefind/pagefind/blob/main/docs/content/docs/hosting.md
|
||||||
|
Content-Security-Policy = "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval'; img-src 'self' data:; connect-src 'self'; font-src 'self' data:; media-src 'self'; child-src 'self'; form-action 'self'; object-src 'self'"
|
||||||
X-XSS-Protection = "1; mode=block"
|
X-XSS-Protection = "1; mode=block"
|
||||||
X-Content-Type-Options = "nosniff"
|
X-Content-Type-Options = "nosniff"
|
||||||
# Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
|
# Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
|
||||||
|
|
|
||||||
|
|
@ -3348,8 +3348,8 @@ room at the start of the returned timeline. The response also includes a
|
||||||
`next_batch` field, which should be used as the value of the `since`
|
`next_batch` field, which should be used as the value of the `since`
|
||||||
parameter in the next call to `/sync`. Finally, the response includes,
|
parameter in the next call to `/sync`. Finally, the response includes,
|
||||||
for each room, a `prev_batch` field, which can be passed as a `from`/`to`
|
for each room, a `prev_batch` field, which can be passed as a `from`/`to`
|
||||||
parameter to the [`/rooms/<room_id>/messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages) API to retrieve earlier
|
parameter to the [`/rooms/{roomId}/messages`](#get_matrixclientv3roomsroomidmessages)
|
||||||
messages.
|
API to retrieve earlier messages.
|
||||||
|
|
||||||
For example, a `/sync` request might return a range of four events
|
For example, a `/sync` request might return a range of four events
|
||||||
`E2`, `E3`, `E4` and `E5` within a given room, omitting two prior events
|
`E2`, `E3`, `E4` and `E5` within a given room, omitting two prior events
|
||||||
|
|
@ -3368,7 +3368,8 @@ response to the previous call as the `since` parameter. The client
|
||||||
should also pass a `timeout` parameter. The server will then hold open
|
should also pass a `timeout` parameter. The server will then hold open
|
||||||
the HTTP connection for a short period of time waiting for new events,
|
the HTTP connection for a short period of time waiting for new events,
|
||||||
returning early if an event occurs. Only the `/sync` API (and the
|
returning early if an event occurs. Only the `/sync` API (and the
|
||||||
deprecated `/events` API) support long-polling in this way.
|
deprecated [`/events`](#get_matrixclientv3events) API) support
|
||||||
|
long-polling in this way.
|
||||||
|
|
||||||
Continuing the example above, an incremental sync might report
|
Continuing the example above, an incremental sync might report
|
||||||
a single new event `E6`. The response can be visualised as:
|
a single new event `E6`. The response can be visualised as:
|
||||||
|
|
@ -3388,7 +3389,7 @@ containing only the most recent message events. A state "delta" is also
|
||||||
returned, summarising any state changes in the omitted part of the
|
returned, summarising any state changes in the omitted part of the
|
||||||
timeline. The client may therefore end up with "gaps" in its knowledge
|
timeline. The client may therefore end up with "gaps" in its knowledge
|
||||||
of the message timeline. The client can fill these gaps using the
|
of the message timeline. The client can fill these gaps using the
|
||||||
[`/rooms/<room_id>/messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages) API.
|
[`/rooms/{roomId}/messages`](#get_matrixclientv3roomsroomidmessages) API.
|
||||||
|
|
||||||
Continuing our example, suppose we make a third `/sync` request asking for
|
Continuing our example, suppose we make a third `/sync` request asking for
|
||||||
events since the last sync, by passing the `next_batch` token `x-y-z` as
|
events since the last sync, by passing the `next_batch` token `x-y-z` as
|
||||||
|
|
@ -3411,7 +3412,7 @@ The limited response includes a state delta which describes how the state
|
||||||
of the room changes over the gap. This delta explains how to build the state
|
of the room changes over the gap. This delta explains how to build the state
|
||||||
prior to returned timeline (i.e. at `E7`) from the state the client knows
|
prior to returned timeline (i.e. at `E7`) from the state the client knows
|
||||||
(i.e. at `E6`). To close the gap, the client should make a request to
|
(i.e. at `E6`). To close the gap, the client should make a request to
|
||||||
[`/rooms/<room_id>/messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages)
|
[`/rooms/{roomId}/messages`](#get_matrixclientv3roomsroomidmessages)
|
||||||
with the query parameters `from=x-y-z` and `to=d-e-f`.
|
with the query parameters `from=x-y-z` and `to=d-e-f`.
|
||||||
|
|
||||||
{{% boxes/warning %}}
|
{{% boxes/warning %}}
|
||||||
|
|
|
||||||
|
|
@ -1484,34 +1484,30 @@ the Policy Server for a signature too.
|
||||||
When a server receives an event over federation from another server, the
|
When a server receives an event over federation from another server, the
|
||||||
receiving server should check the hashes and signatures on that event.
|
receiving server should check the hashes and signatures on that event.
|
||||||
|
|
||||||
First the signature is checked. The event is redacted following the
|
First the signatures are checked. The event is redacted following the
|
||||||
[redaction
|
[redaction algorithm](/client-server-api#redactions), and
|
||||||
algorithm](/client-server-api#redactions), and
|
the resultant object is checked for signatures from the originating
|
||||||
the resultant object is checked for a signature from the originating
|
|
||||||
server, following the algorithm described in [Checking for a
|
server, following the algorithm described in [Checking for a
|
||||||
signature](/appendices#checking-for-a-signature). Note that this
|
signature](/appendices#checking-for-a-signature). Note that this
|
||||||
step should succeed whether we have been sent the full event or a
|
step should succeed whether we have been sent the full event or a
|
||||||
redacted copy.
|
redacted copy.
|
||||||
|
|
||||||
The signatures expected on an event are:
|
For room versions 3 and later, unless the event is a 3rd party invite, only the
|
||||||
|
signature(s) from the originating server (the server the `sender` belongs to)
|
||||||
|
are required for verification. Room versions 1 and 2 also require that a
|
||||||
|
signature is present from the domain in the `event_id`, if it differs from the
|
||||||
|
originating server. If a signature is from an unknown or expired key, it is
|
||||||
|
skipped.
|
||||||
|
|
||||||
- The `sender`'s server, unless the invite was created as a result of
|
If the event is a 3rd party invite, the sender must already match the 3rd party
|
||||||
3rd party invite. The sender must already match the 3rd party
|
invite, and the server which actually sends the event may be a different
|
||||||
invite, and the server which actually sends the event may be a
|
server.
|
||||||
different server.
|
|
||||||
- For room versions 1 and 2, the server which created the `event_id`.
|
|
||||||
Other room versions do not track the `event_id` over federation and
|
|
||||||
therefore do not need a signature from those servers.
|
|
||||||
|
|
||||||
If the signature is found to be valid, the expected content hash is
|
Only signatures from known server keys are validated here. Any unknown keys are ignored.
|
||||||
calculated as described below. The content hash in the `hashes` property
|
In particular, the [policy server key](#validating-policy-server-signatures) is not
|
||||||
of the received event is base64-decoded, and the two are compared for
|
expected to be published and therefore should be skipped at this stage.
|
||||||
equality.
|
Additionally, any keys that are known to have expired prior to the event's
|
||||||
|
`origin_server_ts` are ignored.
|
||||||
If the hash check fails, then it is assumed that this is because we have
|
|
||||||
only been given a redacted version of the event. To enforce this, the
|
|
||||||
receiving server should use the redacted copy it calculated rather than
|
|
||||||
the full copy it received.
|
|
||||||
|
|
||||||
{{% boxes/note %}}
|
{{% boxes/note %}}
|
||||||
{{% added-in v="1.18" %}}
|
{{% added-in v="1.18" %}}
|
||||||
|
|
@ -1519,6 +1515,16 @@ Events sent in rooms with [Policy Servers](#policy-servers) have [additional](#v
|
||||||
signature validation requirements.
|
signature validation requirements.
|
||||||
{{% /boxes/note %}}
|
{{% /boxes/note %}}
|
||||||
|
|
||||||
|
If all signatures from known unexpired keys from the originating server(s) are
|
||||||
|
found to be valid, the expected content hash is calculated as described below.
|
||||||
|
The content hash in the `hashes` property of the received event is base64-decoded,
|
||||||
|
and the two are compared for equality.
|
||||||
|
|
||||||
|
If the hash check fails, then it is assumed that this is because we have
|
||||||
|
only been given a redacted version of the event. To enforce this, the
|
||||||
|
receiving server should use the redacted copy it calculated rather than
|
||||||
|
the full copy it received.
|
||||||
|
|
||||||
### Calculating the reference hash for an event
|
### Calculating the reference hash for an event
|
||||||
|
|
||||||
The *reference hash* of an event covers the essential fields of an
|
The *reference hash* of an event covers the essential fields of an
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,9 @@ allOf:
|
||||||
room_id:
|
room_id:
|
||||||
description: The ID of the room associated with this event.
|
description: The ID of the room associated with this event.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
example: '!jEsUZKDJdhlrceRyVU:example.org'
|
example: '!jEsUZKDJdhlrceRyVU:example.org'
|
||||||
|
|
||||||
unsigned:
|
unsigned:
|
||||||
properties:
|
properties:
|
||||||
redacted_because:
|
redacted_because:
|
||||||
|
|
@ -43,6 +44,6 @@ allOf:
|
||||||
"unsigned": {
|
"unsigned": {
|
||||||
"age": 1257,
|
"age": 1257,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
required:
|
required:
|
||||||
- room_id
|
- room_id
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ properties:
|
||||||
event_id:
|
event_id:
|
||||||
description: The globally unique identifier for this event.
|
description: The globally unique identifier for this event.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
example: '$26RqwJMLw-yds1GAH_QxjHRC1Da9oasK0e5VLnck_45'
|
example: '$26RqwJMLw-yds1GAH_QxjHRC1Da9oasK0e5VLnck_45'
|
||||||
type:
|
type:
|
||||||
description: The type of the event.
|
description: The type of the event.
|
||||||
|
|
@ -47,6 +49,8 @@ properties:
|
||||||
sender:
|
sender:
|
||||||
description: Contains the fully-qualified ID of the user who sent this event.
|
description: Contains the fully-qualified ID of the user who sent this event.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
example: "@example:example.org"
|
example: "@example:example.org"
|
||||||
origin_server_ts:
|
origin_server_ts:
|
||||||
description: |-
|
description: |-
|
||||||
|
|
|
||||||
|
|
@ -39,5 +39,7 @@ properties:
|
||||||
such.
|
such.
|
||||||
event_id:
|
event_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
description: The event ID of the event that this event relates to.
|
description: The event ID of the event that this event relates to.
|
||||||
required: ['rel_type', 'event_id']
|
required: ['rel_type', 'event_id']
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ paths:
|
||||||
example: "!636q39766251:example.com"
|
example: "!636q39766251:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
- in: query
|
- in: query
|
||||||
name: from
|
name: from
|
||||||
x-changedInMatrixVersion:
|
x-changedInMatrixVersion:
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,8 @@ paths:
|
||||||
properties:
|
properties:
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
description: The ID of this room.
|
description: The ID of this room.
|
||||||
membership:
|
membership:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -337,6 +339,8 @@ paths:
|
||||||
example: $asfDuShaf7Gafaw:matrix.org
|
example: $asfDuShaf7Gafaw:matrix.org
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The full event.
|
description: The full event.
|
||||||
|
|
|
||||||
|
|
@ -43,13 +43,17 @@ paths:
|
||||||
example: "!637q39766251:example.com"
|
example: "!637q39766251:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
- in: path
|
- in: path
|
||||||
name: eventId
|
name: eventId
|
||||||
description: The ID of the event to redact
|
description: The ID of the event to redact.
|
||||||
required: true
|
required: true
|
||||||
example: bai2b1i9:matrix.org
|
example: $bai2b1i9:matrix.org
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
- in: path
|
- in: path
|
||||||
name: txnId
|
name: txnId
|
||||||
description: |-
|
description: |-
|
||||||
|
|
@ -82,6 +86,8 @@ paths:
|
||||||
properties:
|
properties:
|
||||||
event_id:
|
event_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
description: A unique identifier for the event.
|
description: A unique identifier for the event.
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
|
|
|
||||||
|
|
@ -233,6 +233,8 @@ components:
|
||||||
example: "!636q39766251:matrix.org"
|
example: "!636q39766251:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
eventId:
|
eventId:
|
||||||
in: path
|
in: path
|
||||||
name: eventId
|
name: eventId
|
||||||
|
|
@ -241,6 +243,8 @@ components:
|
||||||
example: $asfDuShaf7Gafaw
|
example: $asfDuShaf7Gafaw
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
from:
|
from:
|
||||||
in: query
|
in: query
|
||||||
name: from
|
name: from
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ paths:
|
||||||
example: "!636q39766251:matrix.org"
|
example: "!636q39766251:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
- in: query
|
- in: query
|
||||||
name: ts
|
name: ts
|
||||||
description: |-
|
description: |-
|
||||||
|
|
@ -86,6 +88,8 @@ paths:
|
||||||
properties:
|
properties:
|
||||||
event_id:
|
event_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
description: The ID of the event found
|
description: The ID of the event found
|
||||||
origin_server_ts:
|
origin_server_ts:
|
||||||
type: integer
|
type: integer
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ paths:
|
||||||
example: "!636q39766251:example.com"
|
example: "!636q39766251:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The current state of the room
|
description: The current state of the room
|
||||||
|
|
@ -38,6 +40,8 @@ paths:
|
||||||
properties:
|
properties:
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
description: The ID of this room.
|
description: The ID of this room.
|
||||||
membership:
|
membership:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ paths:
|
||||||
example: "!636q39766251:example.com"
|
example: "!636q39766251:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
- in: path
|
- in: path
|
||||||
name: eventType
|
name: eventType
|
||||||
description: The type of event to send.
|
description: The type of event to send.
|
||||||
|
|
@ -86,6 +88,8 @@ paths:
|
||||||
properties:
|
properties:
|
||||||
event_id:
|
event_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
description: A unique identifier for the event.
|
description: A unique identifier for the event.
|
||||||
required:
|
required:
|
||||||
- event_id
|
- event_id
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ paths:
|
||||||
example: "!636q39766251:example.com"
|
example: "!636q39766251:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
- in: path
|
- in: path
|
||||||
name: eventType
|
name: eventType
|
||||||
description: The type of event to send.
|
description: The type of event to send.
|
||||||
|
|
@ -86,6 +88,8 @@ paths:
|
||||||
properties:
|
properties:
|
||||||
event_id:
|
event_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
description: A unique identifier for the event.
|
description: A unique identifier for the event.
|
||||||
required:
|
required:
|
||||||
- event_id
|
- event_id
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ paths:
|
||||||
example: "!636q39766251:matrix.org"
|
example: "!636q39766251:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
- in: path
|
- in: path
|
||||||
name: eventId
|
name: eventId
|
||||||
description: The event ID to get.
|
description: The event ID to get.
|
||||||
|
|
@ -41,6 +43,8 @@ paths:
|
||||||
example: $asfDuShaf7Gafaw:matrix.org
|
example: $asfDuShaf7Gafaw:matrix.org
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The full event.
|
description: The full event.
|
||||||
|
|
@ -89,6 +93,8 @@ paths:
|
||||||
example: "!636q39766251:example.com"
|
example: "!636q39766251:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
- in: path
|
- in: path
|
||||||
name: eventType
|
name: eventType
|
||||||
description: The type of state to look up.
|
description: The type of state to look up.
|
||||||
|
|
@ -158,6 +164,8 @@ paths:
|
||||||
example: "!636q39766251:example.com"
|
example: "!636q39766251:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The current state of the room
|
description: The current state of the room
|
||||||
|
|
@ -211,6 +219,8 @@ paths:
|
||||||
example: "!636q39766251:example.com"
|
example: "!636q39766251:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
- in: query
|
- in: query
|
||||||
name: at
|
name: at
|
||||||
description: |-
|
description: |-
|
||||||
|
|
@ -305,6 +315,8 @@ paths:
|
||||||
example: "!636q39766251:example.com"
|
example: "!636q39766251:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
security:
|
security:
|
||||||
- accessTokenQuery: []
|
- accessTokenQuery: []
|
||||||
- accessTokenBearer: []
|
- accessTokenBearer: []
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,8 @@ paths:
|
||||||
field may be omitted.
|
field may be omitted.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
m.joined_member_count:
|
m.joined_member_count:
|
||||||
type: integer
|
type: integer
|
||||||
description: |-
|
description: |-
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,13 @@ properties:
|
||||||
The signatures are calculated using the process described at
|
The signatures are calculated using the process described at
|
||||||
[Signing JSON](/appendices/#signing-json).
|
[Signing JSON](/appendices/#signing-json).
|
||||||
type: object
|
type: object
|
||||||
additionalProperties:
|
patternProperties:
|
||||||
type: object
|
"":
|
||||||
additionalProperties:
|
x-pattern-format: mx-server-name
|
||||||
type: string
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
format: mx-unpadded-base64
|
||||||
example: {
|
example: {
|
||||||
"magic.forest": {
|
"magic.forest": {
|
||||||
"ed25519:3": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
|
"ed25519:3": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,7 @@ allOf:
|
||||||
The ID of the room associated with this event. Will not be present on events
|
The ID of the room associated with this event. Will not be present on events
|
||||||
that arrive through `/sync`, despite being required everywhere else.
|
that arrive through `/sync`, despite being required everywhere else.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
required:
|
required:
|
||||||
- room_id
|
- room_id
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,8 @@ properties:
|
||||||
sender:
|
sender:
|
||||||
description: The `sender` for the event.
|
description: The `sender` for the event.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
required:
|
required:
|
||||||
- type
|
- type
|
||||||
- state_key
|
- state_key
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,13 @@ allOf:
|
||||||
event_id:
|
event_id:
|
||||||
description: The globally unique event identifier.
|
description: The globally unique event identifier.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
sender:
|
sender:
|
||||||
description: Contains the fully-qualified ID of the user who sent this event.
|
description: Contains the fully-qualified ID of the user who sent this event.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
origin_server_ts:
|
origin_server_ts:
|
||||||
description: Timestamp in milliseconds on originating homeserver
|
description: Timestamp in milliseconds on originating homeserver
|
||||||
when this event was sent.
|
when this event was sent.
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ properties:
|
||||||
The canonical alias for the room. If not present, null, or empty the
|
The canonical alias for the room. If not present, null, or empty the
|
||||||
room should be considered to have no canonical alias.
|
room should be considered to have no canonical alias.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-alias
|
||||||
|
pattern: "^#"
|
||||||
alt_aliases:
|
alt_aliases:
|
||||||
description: |
|
description: |
|
||||||
Alternative aliases the room advertises. This list can have aliases
|
Alternative aliases the room advertises. This list can have aliases
|
||||||
|
|
@ -23,6 +25,8 @@ properties:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-alias
|
||||||
|
pattern: "^#"
|
||||||
type: object
|
type: object
|
||||||
state_key:
|
state_key:
|
||||||
description: A zero-length string.
|
description: A zero-length string.
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ properties:
|
||||||
The `user_id` of the room creator. **Required** for, and only present in, room versions 1 - 10. Starting with
|
The `user_id` of the room creator. **Required** for, and only present in, room versions 1 - 10. Starting with
|
||||||
room version 11 the event `sender` should be used instead.
|
room version 11 the event `sender` should be used instead.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
m.federate:
|
m.federate:
|
||||||
description: Whether users on other servers can join this room. Defaults to `true` if key does not exist.
|
description: Whether users on other servers can join this room. Defaults to `true` if key does not exist.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
@ -32,9 +34,13 @@ properties:
|
||||||
properties:
|
properties:
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
description: The ID of the old room.
|
description: The ID of the old room.
|
||||||
event_id:
|
event_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
deprecated: true
|
deprecated: true
|
||||||
x-changedInMatrixVersion:
|
x-changedInMatrixVersion:
|
||||||
"1.16": |-
|
"1.16": |-
|
||||||
|
|
@ -51,6 +57,8 @@ properties:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
description: Additional user ID to consider a creator of the room, if supported by the room version.
|
description: Additional user ID to consider a creator of the room, if supported by the room version.
|
||||||
x-addedInMatrixVersion: "1.16"
|
x-addedInMatrixVersion: "1.16"
|
||||||
description: |-
|
description: |-
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ properties:
|
||||||
enum: ['m.room_membership']
|
enum: ['m.room_membership']
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
description: |-
|
description: |-
|
||||||
Required if `type` is `m.room_membership`. The room ID to check the
|
Required if `type` is `m.room_membership`. The room ID to check the
|
||||||
user's membership against. If the user is joined to this room, they
|
user's membership against. If the user is joined to this room, they
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,8 @@ properties:
|
||||||
join_authorised_via_users_server:
|
join_authorised_via_users_server:
|
||||||
x-addedInMatrixVersion: "1.2"
|
x-addedInMatrixVersion: "1.2"
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
description: |-
|
description: |-
|
||||||
Usually found on `join` events, this field is used to denote which homeserver (through
|
Usually found on `join` events, this field is used to denote which homeserver (through
|
||||||
representation of a user with sufficient power level) authorised the user's join. More
|
representation of a user with sufficient power level) authorised the user's join. More
|
||||||
|
|
@ -127,6 +129,8 @@ properties:
|
||||||
`join`, the user ID sending the event does not need to match the user ID in the `state_key`,
|
`join`, the user ID sending the event does not need to match the user ID in the `state_key`,
|
||||||
unlike other events. Regular authorisation rules still apply.
|
unlike other events. Regular authorisation rules still apply.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
type:
|
type:
|
||||||
enum:
|
enum:
|
||||||
- m.room.member
|
- m.room.member
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ properties:
|
||||||
redacts:
|
redacts:
|
||||||
description: The event ID that was redacted. Required for, and present starting in, room version 11.
|
description: The event ID that was redacted. Required for, and present starting in, room version 11.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
reason:
|
reason:
|
||||||
description: 'The reason for the redaction, if any.'
|
description: 'The reason for the redaction, if any.'
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -17,6 +19,8 @@ properties:
|
||||||
redacts:
|
redacts:
|
||||||
description: Required for, and only present in, room versions 1 - 10. The event ID that was redacted.
|
description: Required for, and only present in, room versions 1 - 10. The event ID that was redacted.
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-event-id
|
||||||
|
pattern: "^\\$"
|
||||||
type:
|
type:
|
||||||
enum:
|
enum:
|
||||||
- m.room.redaction
|
- m.room.redaction
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,11 @@ mx-mxc-uri:
|
||||||
url: client-server-api#matrix-content-mxc-uris
|
url: client-server-api#matrix-content-mxc-uris
|
||||||
# regex: "^mxc:\\/\\/"
|
# regex: "^mxc:\\/\\/"
|
||||||
|
|
||||||
|
mx-unpadded-base64:
|
||||||
|
title: Unpadded Base64
|
||||||
|
url: appendices#unpadded-base64
|
||||||
|
# no regex
|
||||||
|
|
||||||
uri:
|
uri:
|
||||||
title: URI
|
title: URI
|
||||||
url: https://datatracker.ietf.org/doc/html/rfc3986
|
url: https://datatracker.ietf.org/doc/html/rfc3986
|
||||||
|
|
|
||||||
10
layouts/_partials/search-input.html
Normal file
10
layouts/_partials/search-input.html
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
<div class="td-search td-search--offline">
|
||||||
|
<div class="td-search__icon"></div>
|
||||||
|
<input
|
||||||
|
type="search"
|
||||||
|
class="td-search__input form-control"
|
||||||
|
placeholder="Search the spec"
|
||||||
|
aria-label="Search the spec"
|
||||||
|
autocomplete="off"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
159
package-lock.json
generated
159
package-lock.json
generated
|
|
@ -12,6 +12,7 @@
|
||||||
"@fullhuman/postcss-purgecss": "^6.0.0",
|
"@fullhuman/postcss-purgecss": "^6.0.0",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"node-fetch": "^2.6.7",
|
"node-fetch": "^2.6.7",
|
||||||
|
"pagefind": "^1.4.0",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"postcss-cli": "^11.0.0"
|
"postcss-cli": "^11.0.0"
|
||||||
}
|
}
|
||||||
|
|
@ -170,6 +171,90 @@
|
||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@pagefind/darwin-arm64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/darwin-arm64/-/darwin-arm64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-2vMqkbv3lbx1Awea90gTaBsvpzgRs7MuSgKDxW0m9oV1GPZCZbZBJg/qL83GIUEN2BFlY46dtUZi54pwH+/pTQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/@pagefind/darwin-x64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/darwin-x64/-/darwin-x64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-e7JPIS6L9/cJfow+/IAqknsGqEPjJnVXGjpGm25bnq+NPdoD3c/7fAwr1OXkG4Ocjx6ZGSCijXEV4ryMcH2E3A==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/@pagefind/freebsd-x64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/freebsd-x64/-/freebsd-x64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-WcJVypXSZ+9HpiqZjFXMUobfFfZZ6NzIYtkhQ9eOhZrQpeY5uQFqNWLCk7w9RkMUwBv1HAMDW3YJQl/8OqsV0Q==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"freebsd"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/@pagefind/linux-arm64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/linux-arm64/-/linux-arm64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-PIt8dkqt4W06KGmQjONw7EZbhDF+uXI7i0XtRLN1vjCUxM9vGPdtJc2mUyVPevjomrGz5M86M8bqTr6cgDp1Uw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/@pagefind/linux-x64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/linux-x64/-/linux-x64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-z4oddcWwQ0UHrTHR8psLnVlz6USGJ/eOlDPTDYZ4cI8TK8PgwRUPQZp9D2iJPNIPcS6Qx/E4TebjuGJOyK8Mmg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/@pagefind/windows-x64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/windows-x64/-/windows-x64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-NkT+YAdgS2FPCn8mIA9bQhiBs+xmniMGq1LFPDhcFn0+2yIUEiIG06t7bsZlhdjknEQRTSdT7YitP6fC5qwP0g==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
]
|
||||||
|
},
|
||||||
"node_modules/@pkgjs/parseargs": {
|
"node_modules/@pkgjs/parseargs": {
|
||||||
"version": "0.11.0",
|
"version": "0.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
||||||
|
|
@ -914,6 +999,24 @@
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "BlueOak-1.0.0"
|
"license": "BlueOak-1.0.0"
|
||||||
},
|
},
|
||||||
|
"node_modules/pagefind": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pagefind/-/pagefind-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-z2kY1mQlL4J8q5EIsQkLzQjilovKzfNVhX8De6oyE6uHpfFtyBaqUpcl/XzJC/4fjD8vBDyh1zolimIcVrCn9g==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"pagefind": "lib/runner/bin.cjs"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@pagefind/darwin-arm64": "1.4.0",
|
||||||
|
"@pagefind/darwin-x64": "1.4.0",
|
||||||
|
"@pagefind/freebsd-x64": "1.4.0",
|
||||||
|
"@pagefind/linux-arm64": "1.4.0",
|
||||||
|
"@pagefind/linux-x64": "1.4.0",
|
||||||
|
"@pagefind/windows-x64": "1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/path-key": {
|
"node_modules/path-key": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||||
|
|
@ -1652,6 +1755,48 @@
|
||||||
"fastq": "^1.6.0"
|
"fastq": "^1.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@pagefind/darwin-arm64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/darwin-arm64/-/darwin-arm64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-2vMqkbv3lbx1Awea90gTaBsvpzgRs7MuSgKDxW0m9oV1GPZCZbZBJg/qL83GIUEN2BFlY46dtUZi54pwH+/pTQ==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@pagefind/darwin-x64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/darwin-x64/-/darwin-x64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-e7JPIS6L9/cJfow+/IAqknsGqEPjJnVXGjpGm25bnq+NPdoD3c/7fAwr1OXkG4Ocjx6ZGSCijXEV4ryMcH2E3A==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@pagefind/freebsd-x64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/freebsd-x64/-/freebsd-x64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-WcJVypXSZ+9HpiqZjFXMUobfFfZZ6NzIYtkhQ9eOhZrQpeY5uQFqNWLCk7w9RkMUwBv1HAMDW3YJQl/8OqsV0Q==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@pagefind/linux-arm64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/linux-arm64/-/linux-arm64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-PIt8dkqt4W06KGmQjONw7EZbhDF+uXI7i0XtRLN1vjCUxM9vGPdtJc2mUyVPevjomrGz5M86M8bqTr6cgDp1Uw==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@pagefind/linux-x64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/linux-x64/-/linux-x64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-z4oddcWwQ0UHrTHR8psLnVlz6USGJ/eOlDPTDYZ4cI8TK8PgwRUPQZp9D2iJPNIPcS6Qx/E4TebjuGJOyK8Mmg==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"@pagefind/windows-x64": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pagefind/windows-x64/-/windows-x64-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-NkT+YAdgS2FPCn8mIA9bQhiBs+xmniMGq1LFPDhcFn0+2yIUEiIG06t7bsZlhdjknEQRTSdT7YitP6fC5qwP0g==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
"@pkgjs/parseargs": {
|
"@pkgjs/parseargs": {
|
||||||
"version": "0.11.0",
|
"version": "0.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
|
||||||
|
|
@ -2117,6 +2262,20 @@
|
||||||
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
|
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"pagefind": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pagefind/-/pagefind-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-z2kY1mQlL4J8q5EIsQkLzQjilovKzfNVhX8De6oyE6uHpfFtyBaqUpcl/XzJC/4fjD8vBDyh1zolimIcVrCn9g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@pagefind/darwin-arm64": "1.4.0",
|
||||||
|
"@pagefind/darwin-x64": "1.4.0",
|
||||||
|
"@pagefind/freebsd-x64": "1.4.0",
|
||||||
|
"@pagefind/linux-arm64": "1.4.0",
|
||||||
|
"@pagefind/linux-x64": "1.4.0",
|
||||||
|
"@pagefind/windows-x64": "1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"path-key": {
|
"path-key": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
"main": "none.js",
|
"main": "none.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"get-proposals": "node ./scripts/proposals.js",
|
"get-proposals": "node ./scripts/proposals.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"pagefind": "pagefind $@"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
@ -22,6 +23,7 @@
|
||||||
"@fullhuman/postcss-purgecss": "^6.0.0",
|
"@fullhuman/postcss-purgecss": "^6.0.0",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"node-fetch": "^2.6.7",
|
"node-fetch": "^2.6.7",
|
||||||
|
"pagefind": "^1.4.0",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"postcss-cli": "^11.0.0"
|
"postcss-cli": "^11.0.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue