summary refs log tree commit diff
path: root/synapse/storage/databases
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-09-01 16:02:17 +0100
committerGitHub <noreply@github.com>2020-09-01 16:02:17 +0100
commit5615eb5cb48d63df15c391fe395c8740dc4af017 (patch)
tree51803e1791fc26e85dcfe9aa60152985f7cf10eb /synapse/storage/databases
parentConvert additional databases to async/await (#8199) (diff)
downloadsynapse-5615eb5cb48d63df15c391fe395c8740dc4af017.tar.xz
Rename `_get_e2e_device_keys_txn` (#8222)
... to `_get_e2e_device_keys_and_signatures_txn`, to better reflect what it
does.
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r--synapse/storage/databases/main/devices.py4
-rw-r--r--synapse/storage/databases/main/end_to_end_keys.py10
2 files changed, 8 insertions, 6 deletions
diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py
index a29157d979..11956cc48e 100644
--- a/synapse/storage/databases/main/devices.py
+++ b/synapse/storage/databases/main/devices.py
@@ -256,8 +256,8 @@ class DeviceWorkerStore(SQLBaseStore):
         """
         devices = (
             await self.db_pool.runInteraction(
-                "_get_e2e_device_keys_txn",
-                self._get_e2e_device_keys_txn,
+                "get_e2e_device_keys_and_signatures_txn",
+                self._get_e2e_device_keys_and_signatures_txn,
                 query_map.keys(),
                 include_all_devices=True,
                 include_deleted_devices=True,
diff --git a/synapse/storage/databases/main/end_to_end_keys.py b/synapse/storage/databases/main/end_to_end_keys.py
index fb3b1f94de..1ee062e3c4 100644
--- a/synapse/storage/databases/main/end_to_end_keys.py
+++ b/synapse/storage/databases/main/end_to_end_keys.py
@@ -51,7 +51,7 @@ class EndToEndKeyWorkerStore(SQLBaseStore):
     ) -> Tuple[int, List[JsonDict]]:
         now_stream_id = self.get_device_stream_token()
 
-        devices = self._get_e2e_device_keys_txn(txn, [(user_id, None)])
+        devices = self._get_e2e_device_keys_and_signatures_txn(txn, [(user_id, None)])
 
         if devices:
             user_devices = devices[user_id]
@@ -96,7 +96,9 @@ class EndToEndKeyWorkerStore(SQLBaseStore):
             return {}
 
         results = await self.db_pool.runInteraction(
-            "get_e2e_device_keys", self._get_e2e_device_keys_txn, query_list,
+            "get_e2e_device_keys_and_signatures_txn",
+            self._get_e2e_device_keys_and_signatures_txn,
+            query_list,
         )
 
         # Build the result structure, un-jsonify the results, and add the
@@ -120,9 +122,9 @@ class EndToEndKeyWorkerStore(SQLBaseStore):
         return rv
 
     @trace
-    def _get_e2e_device_keys_txn(
+    def _get_e2e_device_keys_and_signatures_txn(
         self, txn, query_list, include_all_devices=False, include_deleted_devices=False
-    ):
+    ) -> Dict[str, Dict[str, Optional[Dict]]]:
         set_tag("include_all_devices", include_all_devices)
         set_tag("include_deleted_devices", include_deleted_devices)