mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 08:34:12 -04:00
Merge remote-tracking branch 'origin/develop' into rav/event_auth/1
This commit is contained in:
commit
80003dfcd5
46 changed files with 458 additions and 221 deletions
|
@ -248,16 +248,10 @@ class E2eKeysHandler(object):
|
|||
|
||||
results = yield self.store.get_e2e_device_keys(local_query)
|
||||
|
||||
# Build the result structure, un-jsonify the results, and add the
|
||||
# "unsigned" section
|
||||
# Build the result structure
|
||||
for user_id, device_keys in results.items():
|
||||
for device_id, device_info in device_keys.items():
|
||||
r = dict(device_info["keys"])
|
||||
r["unsigned"] = {}
|
||||
display_name = device_info["device_display_name"]
|
||||
if display_name is not None:
|
||||
r["unsigned"]["device_display_name"] = display_name
|
||||
result_dict[user_id][device_id] = r
|
||||
result_dict[user_id][device_id] = device_info
|
||||
|
||||
log_kv(results)
|
||||
return result_dict
|
||||
|
|
|
@ -352,8 +352,8 @@ class E2eRoomKeysHandler(object):
|
|||
A deferred of an empty dict.
|
||||
"""
|
||||
if "version" not in version_info:
|
||||
raise SynapseError(400, "Missing version in body", Codes.MISSING_PARAM)
|
||||
if version_info["version"] != version:
|
||||
version_info["version"] = version
|
||||
elif version_info["version"] != version:
|
||||
raise SynapseError(
|
||||
400, "Version in body does not match", Codes.INVALID_PARAM
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue