summary refs log tree commit diff
path: root/synapse/replication/http/devices.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@matrix.org>2023-09-07 13:45:43 +0100
committerGitHub <noreply@github.com>2023-09-07 12:45:43 +0000
commit1cd410a7833984ef69a7dcecf8997f4c45d609cd (patch)
tree6adfa6dc7184c5bb21230e511fa3fdf198bb5679 /synapse/replication/http/devices.py
parentAdd `/notifications` endpoint to workers (#16265) (diff)
downloadsynapse-1cd410a7833984ef69a7dcecf8997f4c45d609cd.tar.xz
Recheck if remote device is cached before requesting it (#16252)
This fixes a bug where we could get stuck re-requesting the device over
replication again and again.
Diffstat (limited to 'synapse/replication/http/devices.py')
-rw-r--r--synapse/replication/http/devices.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/replication/http/devices.py b/synapse/replication/http/devices.py
index 209833d287..b8198e059c 100644
--- a/synapse/replication/http/devices.py
+++ b/synapse/replication/http/devices.py
@@ -20,7 +20,7 @@ from twisted.web.server import Request
 from synapse.http.server import HttpServer
 from synapse.logging.opentracing import active_span
 from synapse.replication.http._base import ReplicationEndpoint
-from synapse.types import JsonDict
+from synapse.types import JsonDict, JsonMapping
 
 if TYPE_CHECKING:
     from synapse.server import HomeServer
@@ -82,7 +82,7 @@ class ReplicationMultiUserDevicesResyncRestServlet(ReplicationEndpoint):
 
     async def _handle_request(  # type: ignore[override]
         self, request: Request, content: JsonDict
-    ) -> Tuple[int, Dict[str, Optional[JsonDict]]]:
+    ) -> Tuple[int, Dict[str, Optional[JsonMapping]]]:
         user_ids: List[str] = content["user_ids"]
 
         logger.info("Resync for %r", user_ids)