summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2023-05-09 22:02:36 +0300
committerGitHub <noreply@github.com>2023-05-09 15:02:36 -0400
commit86d541f37c1bc9197a6f561b31f3aa359740b4bd (patch)
treec5ffe070e1933f8ff0bb202ec1b9ee2ab6f36c1c /synapse/rest
parentHTTP Replication Client (#15470) (diff)
downloadsynapse-86d541f37c1bc9197a6f561b31f3aa359740b4bd.tar.xz
Stabilize MSC2659 support for AS ping endpoint. (#15528)
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/appservice_ping.py10
-rw-r--r--synapse/rest/client/versions.py2
2 files changed, 5 insertions, 7 deletions
diff --git a/synapse/rest/client/appservice_ping.py b/synapse/rest/client/appservice_ping.py
index 31466a4ad4..3f553d14d1 100644
--- a/synapse/rest/client/appservice_ping.py
+++ b/synapse/rest/client/appservice_ping.py
@@ -39,9 +39,8 @@ logger = logging.getLogger(__name__)
 
 class AppservicePingRestServlet(RestServlet):
     PATTERNS = client_patterns(
-        "/fi.mau.msc2659/appservice/(?P<appservice_id>[^/]*)/ping",
-        unstable=True,
-        releases=(),
+        "/appservice/(?P<appservice_id>[^/]*)/ping",
+        releases=("v1",),
     )
 
     def __init__(self, hs: "HomeServer"):
@@ -107,9 +106,8 @@ class AppservicePingRestServlet(RestServlet):
 
         duration = time.monotonic() - start
 
-        return HTTPStatus.OK, {"duration": int(duration * 1000)}
+        return HTTPStatus.OK, {"duration_ms": int(duration * 1000)}
 
 
 def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
-    if hs.config.experimental.msc2659_enabled:
-        AppservicePingRestServlet(hs).register(http_server)
+    AppservicePingRestServlet(hs).register(http_server)
diff --git a/synapse/rest/client/versions.py b/synapse/rest/client/versions.py
index 59aed66464..5c98916ec2 100644
--- a/synapse/rest/client/versions.py
+++ b/synapse/rest/client/versions.py
@@ -111,7 +111,7 @@ class VersionsRestServlet(RestServlet):
                     # Allows moderators to fetch redacted event content as described in MSC2815
                     "fi.mau.msc2815": self.config.experimental.msc2815_enabled,
                     # Adds a ping endpoint for appservices to check HS->AS connection
-                    "fi.mau.msc2659": self.config.experimental.msc2659_enabled,
+                    "fi.mau.msc2659.stable": True,  # TODO: remove when "v1.7" is added above
                     # Adds support for login token requests as per MSC3882
                     "org.matrix.msc3882": self.config.experimental.msc3882_enabled,
                     # Adds support for remotely enabling/disabling pushers, as per MSC3881