summary refs log tree commit diff
path: root/synapse/handlers/e2e_keys.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-01-26 16:30:37 +0000
committerErik Johnston <erik@matrix.org>2017-01-26 16:33:21 +0000
commitfbfad76c03afe7538c67205ceb30825d9ce4fb07 (patch)
treee55a45bf12542f968fa1099af8fdd368a24331b5 /synapse/handlers/e2e_keys.py
parentImplement device key caching over federation (diff)
downloadsynapse-fbfad76c03afe7538c67205ceb30825d9ce4fb07.tar.xz
Add comments
Diffstat (limited to 'synapse/handlers/e2e_keys.py')
-rw-r--r--synapse/handlers/e2e_keys.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py
index 832998a6d3..a16b9def8d 100644
--- a/synapse/handlers/e2e_keys.py
+++ b/synapse/handlers/e2e_keys.py
@@ -75,7 +75,7 @@ class E2eKeysHandler(object):
             else:
                 remote_queries[user_id] = device_ids
 
-        # do the queries
+        # Firt get local devices.
         failures = {}
         results = {}
         if local_query:
@@ -84,6 +84,7 @@ class E2eKeysHandler(object):
                 if user_id in local_query:
                     results[user_id] = keys
 
+        # Now attempt to get any remote devices from our local cache.
         remote_queries_not_in_cache = {}
         if remote_queries:
             query_list = []
@@ -115,6 +116,7 @@ class E2eKeysHandler(object):
                 r = remote_queries_not_in_cache.setdefault(domain, {})
                 r[user_id] = remote_queries[user_id]
 
+        # Now fetch any devices that we don't have in our cache
         @defer.inlineCallbacks
         def do_remote_query(destination):
             destination_query = remote_queries_not_in_cache[destination]