mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
update to work with newer code, and fix formatting
This commit is contained in:
parent
41ad35b523
commit
1fabf82d50
@ -468,7 +468,7 @@ class DeviceHandler(DeviceWorkerHandler):
|
|||||||
"stream_id": stream_id,
|
"stream_id": stream_id,
|
||||||
"devices": devices,
|
"devices": devices,
|
||||||
"master_key": master_key,
|
"master_key": master_key,
|
||||||
"self_signing_key": self_signing_key
|
"self_signing_key": self_signing_key,
|
||||||
}
|
}
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
@ -260,7 +260,7 @@ class E2eKeysHandler(object):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
defer.Deferred[dict[str, dict[str, dict]]]: map from
|
defer.Deferred[dict[str, dict[str, dict]]]: map from
|
||||||
(master|self_signing|user_signing) -> user_id -> key
|
(master_keys|self_signing_keys|user_signing_keys) -> user_id -> key
|
||||||
"""
|
"""
|
||||||
master_keys = {}
|
master_keys = {}
|
||||||
self_signing_keys = {}
|
self_signing_keys = {}
|
||||||
@ -355,10 +355,11 @@ class E2eKeysHandler(object):
|
|||||||
ret = {"device_keys": res}
|
ret = {"device_keys": res}
|
||||||
|
|
||||||
# add in the cross-signing keys
|
# add in the cross-signing keys
|
||||||
cross_signing_keys = yield self.query_cross_signing_keys(device_keys_query, None)
|
cross_signing_keys = yield self.get_cross_signing_keys_from_cache(
|
||||||
|
device_keys_query, None
|
||||||
|
)
|
||||||
|
|
||||||
for key, value in iteritems(cross_signing_keys):
|
ret.update(cross_signing_keys)
|
||||||
ret[key + "_keys"] = value
|
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ class DeviceWorkerStore(SQLBaseStore):
|
|||||||
# figure out which cross-signing keys were changed by intersecting the
|
# figure out which cross-signing keys were changed by intersecting the
|
||||||
# update list with the master/self-signing key by user maps
|
# update list with the master/self-signing key by user maps
|
||||||
cross_signing_keys_by_user = {}
|
cross_signing_keys_by_user = {}
|
||||||
for user_id, device_id, stream in updates:
|
for user_id, device_id, stream, _opentracing_context in updates:
|
||||||
if device_id == master_key_by_user.get(user_id, {}).get("pubkey", None):
|
if device_id == master_key_by_user.get(user_id, {}).get("pubkey", None):
|
||||||
result = cross_signing_keys_by_user.setdefault(user_id, {})
|
result = cross_signing_keys_by_user.setdefault(user_id, {})
|
||||||
result["master_key"] = master_key_by_user[user_id]["key_info"]
|
result["master_key"] = master_key_by_user[user_id]["key_info"]
|
||||||
|
Loading…
Reference in New Issue
Block a user