summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/13098.feature1
-rw-r--r--synapse/storage/databases/main/devices.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/13098.feature b/changelog.d/13098.feature
new file mode 100644
index 0000000000..7b0667ba95
--- /dev/null
+++ b/changelog.d/13098.feature
@@ -0,0 +1 @@
+Speed up fetching of device list changes in `/sync` and `/keys/changes`.
diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py
index 93d980786e..adde5d0978 100644
--- a/synapse/storage/databases/main/devices.py
+++ b/synapse/storage/databases/main/devices.py
@@ -1245,8 +1245,8 @@ class DeviceWorkerStore(EndToEndKeyWorkerStore):
 
         def _get_device_list_changes_in_rooms_txn(
             txn: LoggingTransaction,
-            clause,
-            args,
+            clause: str,
+            args: List[Any],
         ) -> Set[str]:
             txn.execute(sql.format(clause=clause), args)
             return {user_id for user_id, in txn}