summary refs log tree commit diff
path: root/synapse/handlers/e2e_keys.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-04-16 17:23:28 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-04-16 17:23:28 +0100
commitc215378411ab7604e8687b60e2dca7c2391271ba (patch)
treea3ddd4e337986df78f294557a55ab1472cc54e38 /synapse/handlers/e2e_keys.py
parentUse query_user_devices instead, assume only master, self_signing key types (diff)
downloadsynapse-c215378411ab7604e8687b60e2dca7c2391271ba.tar.xz
Make changelog more useful
Diffstat (limited to 'synapse/handlers/e2e_keys.py')
-rw-r--r--synapse/handlers/e2e_keys.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py
index f92544c731..fee1f9d509 100644
--- a/synapse/handlers/e2e_keys.py
+++ b/synapse/handlers/e2e_keys.py
@@ -973,6 +973,8 @@ class E2eKeysHandler(object):
         self, user_id, desired_key_type, from_user_id=None
     ):
         """Fetch the cross-signing public key from storage and interpret it.
+        If we cannot find the public key locally, we query the keys from the
+        homeserver they belong to, then update our local copy.
 
         Args:
             user_id (str): the user whose key should be fetched
@@ -994,11 +996,10 @@ class E2eKeysHandler(object):
 
         # If we still can't find the key, and we're looking for keys of another user,
         # then attempt to fetch the missing key from the remote user's server.
-        #
-        # We don't get "user_signing" keys from remote servers, so disallow that here
         if (
             key is None
             and not self.is_mine(user)
+            # We don't get "user_signing" keys from remote servers, so disallow that here
             and desired_key_type != "user_signing"
         ):
             try: