diff options
author | Erik Johnston <erik@matrix.org> | 2018-09-19 15:08:36 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-09-19 15:08:36 +0100 |
commit | ce846bb620e9866531f4a49f183fdd3cbb3f1eeb (patch) | |
tree | ed38561118af50948598967e17ad6a7f1fee8a8c /synapse/handlers/e2e_keys.py | |
parent | Newsfile (diff) | |
parent | Merge pull request #3910 from matrix-org/erikj/update_timeout (diff) | |
download | synapse-ce846bb620e9866531f4a49f183fdd3cbb3f1eeb.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/faster_typing
Diffstat (limited to 'synapse/handlers/e2e_keys.py')
-rw-r--r-- | synapse/handlers/e2e_keys.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py index 5816bf8b4f..578e9250fb 100644 --- a/synapse/handlers/e2e_keys.py +++ b/synapse/handlers/e2e_keys.py @@ -330,7 +330,8 @@ class E2eKeysHandler(object): (algorithm, key_id, ex_json, key) ) else: - new_keys.append((algorithm, key_id, encode_canonical_json(key))) + new_keys.append(( + algorithm, key_id, encode_canonical_json(key).decode('ascii'))) yield self.store.add_e2e_one_time_keys( user_id, device_id, time_now, new_keys @@ -358,7 +359,7 @@ def _exception_to_failure(e): # Note that some Exceptions (notably twisted's ResponseFailed etc) don't # give a string for e.message, which json then fails to serialize. return { - "status": 503, "message": str(e.message), + "status": 503, "message": str(e), } |