mirror of
https://mau.dev/maunium/synapse.git
synced 2024-09-04 16:42:35 +00:00
Merge pull request #981 from matrix-org/rav/omit_device_displayname_if_null
keys/query: Omit device displayname if null
This commit is contained in:
commit
ab03912e94
@ -122,9 +122,10 @@ class E2eKeysHandler(object):
|
|||||||
for user_id, device_keys in results.items():
|
for user_id, device_keys in results.items():
|
||||||
for device_id, device_info in device_keys.items():
|
for device_id, device_info in device_keys.items():
|
||||||
r = json.loads(device_info["key_json"])
|
r = json.loads(device_info["key_json"])
|
||||||
r["unsigned"] = {
|
r["unsigned"] = {}
|
||||||
"device_display_name": device_info["device_display_name"],
|
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] = r
|
||||||
|
|
||||||
defer.returnValue(result_dict)
|
defer.returnValue(result_dict)
|
||||||
|
Loading…
Reference in New Issue
Block a user