Skip to content

Commit 3e7eec3

Browse files
committed
Remove ReplicationUploadKeysForUserRestServlet
As we are now well past Synapse 1.135. This was originally added in #18581.
1 parent 84e1d15 commit 3e7eec3

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

synapse/replication/http/devices.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -185,46 +185,6 @@ async def _handle_request( # type: ignore[override]
185185
return 200, multi_user_devices
186186

187187

188-
# FIXME(2025-07-22): Remove this on the next release, this will only get used
189-
# during rollout to Synapse 1.135 and can be removed after that release.
190-
class ReplicationUploadKeysForUserRestServlet(ReplicationEndpoint):
191-
"""Unused endpoint, kept for backwards compatibility during rollout."""
192-
193-
NAME = "upload_keys_for_user"
194-
PATH_ARGS = ()
195-
CACHE = False
196-
197-
def __init__(self, hs: "HomeServer"):
198-
super().__init__(hs)
199-
200-
self.e2e_keys_handler = hs.get_e2e_keys_handler()
201-
self.store = hs.get_datastores().main
202-
self.clock = hs.get_clock()
203-
204-
@staticmethod
205-
async def _serialize_payload( # type: ignore[override]
206-
user_id: str, device_id: str, keys: JsonDict
207-
) -> JsonDict:
208-
return {
209-
"user_id": user_id,
210-
"device_id": device_id,
211-
"keys": keys,
212-
}
213-
214-
async def _handle_request( # type: ignore[override]
215-
self, request: Request, content: JsonDict
216-
) -> Tuple[int, JsonDict]:
217-
user_id = content["user_id"]
218-
device_id = content["device_id"]
219-
keys = content["keys"]
220-
221-
results = await self.e2e_keys_handler.upload_keys_for_user(
222-
user_id, device_id, keys
223-
)
224-
225-
return 200, results
226-
227-
228188
class ReplicationHandleNewDeviceUpdateRestServlet(ReplicationEndpoint):
229189
"""Wake up a device writer to send local device list changes as federation outbound pokes.
230190
@@ -291,5 +251,4 @@ def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
291251
ReplicationNotifyUserSignatureUpdateRestServlet(hs).register(http_server)
292252
ReplicationMultiUserDevicesResyncRestServlet(hs).register(http_server)
293253
ReplicationHandleNewDeviceUpdateRestServlet(hs).register(http_server)
294-
ReplicationUploadKeysForUserRestServlet(hs).register(http_server)
295254
ReplicationDeviceHandleRoomUnPartialStated(hs).register(http_server)

0 commit comments

Comments
 (0)