Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix endpoint improperly declaring support for MSC3814 #16068

Merged
merged 4 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/16068.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix endpoint improperly declaring support for MSC3814.
clokep marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 4 additions & 6 deletions synapse/rest/client/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class Config:
class DehydratedDeviceServlet(RestServlet):
"""Retrieve or store a dehydrated device.

Implements either MSC2697 or MSC3814.
Implements MSC2697.

GET /org.matrix.msc2697.v2/dehydrated_device

Expand Down Expand Up @@ -266,7 +266,7 @@ class DehydratedDeviceServlet(RestServlet):

"""

def __init__(self, hs: "HomeServer", msc2697: bool = True):
def __init__(self, hs: "HomeServer"):
super().__init__()
self.hs = hs
self.auth = hs.get_auth()
Expand All @@ -275,9 +275,7 @@ def __init__(self, hs: "HomeServer", msc2697: bool = True):
self.device_handler = handler

self.PATTERNS = client_patterns(
clokep marked this conversation as resolved.
Show resolved Hide resolved
"/org.matrix.msc2697.v2/dehydrated_device$"
if msc2697
else "/org.matrix.msc3814.v1/dehydrated_device$",
"/org.matrix.msc2697.v2/dehydrated_device$",
releases=(),
)

Expand Down Expand Up @@ -573,7 +571,7 @@ def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
if hs.config.worker.worker_app is None:
DeviceRestServlet(hs).register(http_server)
if hs.config.experimental.msc2697_enabled:
DehydratedDeviceServlet(hs, msc2697=True).register(http_server)
DehydratedDeviceServlet(hs).register(http_server)
ClaimDehydratedDeviceServlet(hs).register(http_server)
if hs.config.experimental.msc3814_enabled:
DehydratedDeviceV2Servlet(hs).register(http_server)
Expand Down