From 43f5cc7adc02a05ba4075b8aab3b479bda67f441 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Thu, 16 Dec 2021 11:25:37 -0600 Subject: [PATCH] Add MSC2716 and MSC3030 to `/versions` -> `unstable_features` (#11582) As suggested in https://github.com/matrix-org/matrix-react-sdk/pull/7372#discussion_r769523369 --- changelog.d/11582.misc | 1 + synapse/config/experimental.py | 2 +- synapse/rest/client/versions.py | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog.d/11582.misc diff --git a/changelog.d/11582.misc b/changelog.d/11582.misc new file mode 100644 index 000000000000..a0291f64e271 --- /dev/null +++ b/changelog.d/11582.misc @@ -0,0 +1 @@ +Add [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) and [MSC3030](https://github.com/matrix-org/matrix-doc/pull/3030) to `/versions` -> `unstable_features` to detect server support. diff --git a/synapse/config/experimental.py b/synapse/config/experimental.py index 678c78d56512..dbaeb1091861 100644 --- a/synapse/config/experimental.py +++ b/synapse/config/experimental.py @@ -32,7 +32,7 @@ def read_config(self, config: JsonDict, **kwargs): # MSC3026 (busy presence state) self.msc3026_enabled: bool = experimental.get("msc3026_enabled", False) - # MSC2716 (backfill existing history) + # MSC2716 (importing historical messages) self.msc2716_enabled: bool = experimental.get("msc2716_enabled", False) # MSC2285 (hidden read receipts) diff --git a/synapse/rest/client/versions.py b/synapse/rest/client/versions.py index 8d888f456520..2290c57c126e 100644 --- a/synapse/rest/client/versions.py +++ b/synapse/rest/client/versions.py @@ -93,6 +93,10 @@ def on_GET(self, request: Request) -> Tuple[int, JsonDict]: "org.matrix.msc3026.busy_presence": self.config.experimental.msc3026_enabled, # Supports receiving hidden read receipts as per MSC2285 "org.matrix.msc2285": self.config.experimental.msc2285_enabled, + # Adds support for importing historical messages as per MSC2716 + "org.matrix.msc2716": self.config.experimental.msc2716_enabled, + # Adds support for jump to date endpoints (/timestamp_to_event) as per MSC3030 + "org.matrix.msc3030": self.config.experimental.msc3030_enabled, }, }, )