summary refs log tree commit diff
diff options
context:
space:
mode:
authorHugh Nimmo-Smith <hughns@element.io>2023-05-25 13:28:38 +0100
committerHugh Nimmo-Smith <hughns@element.io>2023-05-25 13:28:38 +0100
commit73e0ca2f85bd113bac1cee4ce9999c00ff3b476b (patch)
treeef3accb784d36184fd8d3354f11082ebc80a6737
parentReference stable feature in changelog (diff)
downloadsynapse-73e0ca2f85bd113bac1cee4ce9999c00ff3b476b.tar.xz
Reinstate support for unstable revision 0 of MSC3882
-rw-r--r--synapse/rest/client/login_token_request.py12
-rw-r--r--synapse/rest/client/versions.py2
2 files changed, 11 insertions, 3 deletions
diff --git a/synapse/rest/client/login_token_request.py b/synapse/rest/client/login_token_request.py
index a3c2704493..8cfc2fc489 100644
--- a/synapse/rest/client/login_token_request.py
+++ b/synapse/rest/client/login_token_request.py
@@ -48,9 +48,13 @@ class LoginTokenRequestServlet(RestServlet):
     }
     """
 
-    PATTERNS = client_patterns(
-        "/login/get_token$", releases=["v1"], v1=False, unstable=False
-    )
+    PATTERNS = [
+        *client_patterns("/login/get_token$", releases=["v1"], v1=False, unstable=False),
+        # TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
+        *client_patterns(
+            "/org.matrix.msc3882/login/token$", releases=[], v1=False, unstable=True
+        ),
+    ]
 
     def __init__(self, hs: "HomeServer"):
         super().__init__()
@@ -95,6 +99,8 @@ class LoginTokenRequestServlet(RestServlet):
             200,
             {
                 "login_token": login_token,
+                # TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
+                "expires_in": self.token_timeout // 1000,
                 "expires_in_ms": self.token_timeout,
             },
         )
diff --git a/synapse/rest/client/versions.py b/synapse/rest/client/versions.py
index 1eb11081a0..c9f062ae79 100644
--- a/synapse/rest/client/versions.py
+++ b/synapse/rest/client/versions.py
@@ -115,6 +115,8 @@ class VersionsRestServlet(RestServlet):
                     "fi.mau.msc2659.stable": True,  # TODO: remove when "v1.7" is added above
                     # Adds support for remotely enabling/disabling pushers, as per MSC3881
                     "org.matrix.msc3881": self.config.experimental.msc3881_enabled,
+                    # TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
+                    "org.matrix.msc3882": self.config.auth.login_via_existing_enabled,
                     # Adds support for filtering /messages by event relation.
                     "org.matrix.msc3874": self.config.experimental.msc3874_enabled,
                     # Adds support for simple HTTP rendezvous as per MSC3886