summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2024-04-09 12:11:08 -0400
committerGitHub <noreply@github.com>2024-04-09 17:11:08 +0100
commita2a543fd122e5704dea5181c03f5cdc4c1ea9475 (patch)
tree90fd5036cb60530e7bf3f69d4ae938d2afa6dc62 /synapse
parentAlso check if first event matches the last in prev batch (#17066) (diff)
downloadsynapse-a2a543fd122e5704dea5181c03f5cdc4c1ea9475.tar.xz
Stabliize support for MSC3981: recurse /relations (#17023)
See
[MSC3981](https://github.com/matrix-org/matrix-spec-proposals/pull/3981),
this pretty much just removes flags though.

Part of #17021
Diffstat (limited to 'synapse')
-rw-r--r--synapse/config/experimental.py5
-rw-r--r--synapse/rest/client/relations.py10
-rw-r--r--synapse/rest/client/versions.py3
3 files changed, 5 insertions, 13 deletions
diff --git a/synapse/config/experimental.py b/synapse/config/experimental.py
index 0bd3befdc2..cc0c91a175 100644
--- a/synapse/config/experimental.py
+++ b/synapse/config/experimental.py
@@ -393,11 +393,6 @@ class ExperimentalConfig(Config):
         # MSC3967: Do not require UIA when first uploading cross signing keys
         self.msc3967_enabled = experimental.get("msc3967_enabled", False)
 
-        # MSC3981: Recurse relations
-        self.msc3981_recurse_relations = experimental.get(
-            "msc3981_recurse_relations", False
-        )
-
         # MSC3861: Matrix architecture change to delegate authentication via OIDC
         try:
             self.msc3861 = MSC3861(**experimental.get("msc3861", {}))
diff --git a/synapse/rest/client/relations.py b/synapse/rest/client/relations.py
index 42da017f37..49943cf0c3 100644
--- a/synapse/rest/client/relations.py
+++ b/synapse/rest/client/relations.py
@@ -55,7 +55,6 @@ class RelationPaginationServlet(RestServlet):
         self.auth = hs.get_auth()
         self._store = hs.get_datastores().main
         self._relations_handler = hs.get_relations_handler()
-        self._support_recurse = hs.config.experimental.msc3981_recurse_relations
 
     async def on_GET(
         self,
@@ -70,12 +69,9 @@ class RelationPaginationServlet(RestServlet):
         pagination_config = await PaginationConfig.from_request(
             self._store, request, default_limit=5, default_dir=Direction.BACKWARDS
         )
-        if self._support_recurse:
-            recurse = parse_boolean(request, "recurse", default=False) or parse_boolean(
-                request, "org.matrix.msc3981.recurse", default=False
-            )
-        else:
-            recurse = False
+        recurse = parse_boolean(request, "recurse", default=False) or parse_boolean(
+            request, "org.matrix.msc3981.recurse", default=False
+        )
 
         # The unstable version of this API returns an extra field for client
         # compatibility, see https://github.com/matrix-org/synapse/issues/12930.
diff --git a/synapse/rest/client/versions.py b/synapse/rest/client/versions.py
index 32db274f32..c46d4fe8cf 100644
--- a/synapse/rest/client/versions.py
+++ b/synapse/rest/client/versions.py
@@ -132,7 +132,8 @@ class VersionsRestServlet(RestServlet):
                     # Adds support for relation-based redactions as per MSC3912.
                     "org.matrix.msc3912": self.config.experimental.msc3912_enabled,
                     # Whether recursively provide relations is supported.
-                    "org.matrix.msc3981": self.config.experimental.msc3981_recurse_relations,
+                    # TODO This is no longer needed once unstable MSC3981 does not need to be supported.
+                    "org.matrix.msc3981": True,
                     # Adds support for deleting account data.
                     "org.matrix.msc3391": self.config.experimental.msc3391_enabled,
                     # Allows clients to inhibit profile update propagation.