mirror of
https://github.com/element-hq/synapse
synced 2024-08-17 18:40:52 +00:00
keys/query: Omit device displayname if null
... which makes it more consistent with user displaynames.
This commit is contained in:
parent
05e3354047
commit
f131cd9e53
1 changed files with 4 additions and 3 deletions
|
@ -122,9 +122,10 @@ class E2eKeysHandler(object):
|
|||
for user_id, device_keys in results.items():
|
||||
for device_id, device_info in device_keys.items():
|
||||
r = json.loads(device_info["key_json"])
|
||||
r["unsigned"] = {
|
||||
"device_display_name": device_info["device_display_name"],
|
||||
}
|
||||
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
|
||||
|
||||
defer.returnValue(result_dict)
|
||||
|
|
Loading…
Reference in a new issue