diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2016-08-04 12:51:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-04 12:51:43 +0100 |
commit | ab03912e944b1aff986f2a75512280ded12abc92 (patch) | |
tree | 94a3b8074a4922b7130a3e3bf5150934f36ee2c5 /synapse/handlers/e2e_keys.py | |
parent | Factor out more common code from the jenkins scripts (#980) (diff) | |
parent | keys/query: Omit device displayname if null (diff) | |
download | synapse-ab03912e944b1aff986f2a75512280ded12abc92.tar.xz |
Merge pull request #981 from matrix-org/rav/omit_device_displayname_if_null
keys/query: Omit device displayname if null
Diffstat (limited to 'synapse/handlers/e2e_keys.py')
-rw-r--r-- | synapse/handlers/e2e_keys.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py index bb69089b91..2c7bfd91ed 100644 --- a/synapse/handlers/e2e_keys.py +++ b/synapse/handlers/e2e_keys.py @@ -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) |