From 877b45e8120c5f80ed0965b7c072fd0b8d7ce36a Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 5 Jan 2022 12:08:03 -0500 Subject: Include `io.element.thread` capability for MSC3440. (#11690) --- changelog.d/11690.misc | 1 + synapse/rest/client/capabilities.py | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/11690.misc diff --git a/changelog.d/11690.misc b/changelog.d/11690.misc new file mode 100644 index 0000000000..76cd286862 --- /dev/null +++ b/changelog.d/11690.misc @@ -0,0 +1 @@ +Update the `/capabilities` response to include whether support for [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440) is available. diff --git a/synapse/rest/client/capabilities.py b/synapse/rest/client/capabilities.py index 2a3e24ae7e..5c0e3a5680 100644 --- a/synapse/rest/client/capabilities.py +++ b/synapse/rest/client/capabilities.py @@ -73,6 +73,9 @@ class CapabilitiesRestServlet(RestServlet): "enabled": self.config.registration.enable_3pid_changes } + if self.config.experimental.msc3440_enabled: + response["capabilities"]["io.element.thread"] = {"enabled": True} + return 200, response -- cgit 1.5.1 From 83acdb23fe318f8a41d2a6b800d994d46754a903 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 5 Jan 2022 12:09:15 -0500 Subject: Re-run towncrier. --- CHANGES.md | 1 + changelog.d/11690.misc | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 changelog.d/11690.misc diff --git a/CHANGES.md b/CHANGES.md index e8cd60e9e5..486cfae86f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -83,6 +83,7 @@ Internal Changes - Improve the error messages from `get_create_event_for_room`. ([\#11638](https://github.com/matrix-org/synapse/issues/11638)) - Remove redundant `get_current_events_token` method. ([\#11643](https://github.com/matrix-org/synapse/issues/11643)) - Convert `namedtuples` to `attrs`. ([\#11665](https://github.com/matrix-org/synapse/issues/11665), [\#11574](https://github.com/matrix-org/synapse/issues/11574)) +- Update the `/capabilities` response to include whether support for [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440) is available. ([\#11690](https://github.com/matrix-org/synapse/issues/11690)) Synapse 1.49.2 (2021-12-21) diff --git a/changelog.d/11690.misc b/changelog.d/11690.misc deleted file mode 100644 index 76cd286862..0000000000 --- a/changelog.d/11690.misc +++ /dev/null @@ -1 +0,0 @@ -Update the `/capabilities` response to include whether support for [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440) is available. -- cgit 1.5.1 From daea7bcc34a0b5c4834fd06d204c620a23eab52c Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Wed, 5 Jan 2022 18:16:10 +0000 Subject: Tweak changelog for #11677 --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 486cfae86f..77a56dd481 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,7 +24,6 @@ Bugfixes - Fix a long-standing bug where responses included bundled aggregations when they should not, per [MSC2675](https://github.com/matrix-org/matrix-doc/pull/2675). ([\#11592](https://github.com/matrix-org/synapse/issues/11592), [\#11623](https://github.com/matrix-org/synapse/issues/11623)) - Fix a long-standing bug that some unknown endpoints would return HTML error pages instead of JSON `M_UNRECOGNIZED` errors. ([\#11602](https://github.com/matrix-org/synapse/issues/11602)) - Fix a bug introduced in Synapse 1.19.3 which could sometimes cause `AssertionError`s when backfilling rooms over federation. ([\#11632](https://github.com/matrix-org/synapse/issues/11632)) -- Fix a bug in `SimpleHttpClient.get_json` that results in the `Accept` request header being absent. ([\#11677](https://github.com/matrix-org/synapse/issues/11677)) Improved Documentation @@ -84,6 +83,7 @@ Internal Changes - Remove redundant `get_current_events_token` method. ([\#11643](https://github.com/matrix-org/synapse/issues/11643)) - Convert `namedtuples` to `attrs`. ([\#11665](https://github.com/matrix-org/synapse/issues/11665), [\#11574](https://github.com/matrix-org/synapse/issues/11574)) - Update the `/capabilities` response to include whether support for [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440) is available. ([\#11690](https://github.com/matrix-org/synapse/issues/11690)) +- Send the `Accept` header in HTTP requests made using `SimpleHttpClient.get_json`. ([\#11677](https://github.com/matrix-org/synapse/issues/11677)) Synapse 1.49.2 (2021-12-21) -- cgit 1.5.1 From eec34b1f2a53af45807cb718a26861be3f2fd43c Mon Sep 17 00:00:00 2001 From: reivilibre Date: Thu, 6 Jan 2022 16:36:26 +0000 Subject: Work around Mjolnir compatibility issue by adding an import for `glob_to_regex` in `synapse.util`, where it moved from. (#11696) --- changelog.d/11696.misc | 1 + synapse/util/__init__.py | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 changelog.d/11696.misc diff --git a/changelog.d/11696.misc b/changelog.d/11696.misc new file mode 100644 index 0000000000..e8f39dde18 --- /dev/null +++ b/changelog.d/11696.misc @@ -0,0 +1 @@ +Work around Mjolnir compatibility issue by adding an import for `glob_to_regex` in `synapse.util`, where it moved from. \ No newline at end of file diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py index f157132210..511f52534b 100644 --- a/synapse/util/__init__.py +++ b/synapse/util/__init__.py @@ -31,6 +31,13 @@ from synapse.logging import context if typing.TYPE_CHECKING: pass +# FIXME Mjolnir imports glob_to_regex from this file, but it was moved to +# matrix_common. +# As a temporary workaround, we import glob_to_regex here for +# compatibility with current versions of Mjolnir. +# See https://github.com/matrix-org/mjolnir/pull/174 +from matrix_common.regex import glob_to_regex # noqa + logger = logging.getLogger(__name__) -- cgit 1.5.1