summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-10-11 10:11:59 -0400
committerGitHub <noreply@github.com>2019-10-11 10:11:59 -0400
commit691dd67fcd0b376c1e5a5d9f2fe0f7efbf1cc7c9 (patch)
tree50dd0336df9ef58b46ed68dfa7d0827ef1a46b26 /synapse/handlers
parentMerge pull request #6195 from matrix-org/erikj/opentracing_preview_url (diff)
parentchange test name to be unique (diff)
downloadsynapse-691dd67fcd0b376c1e5a5d9f2fe0f7efbf1cc7c9.tar.xz
Merge pull request #6189 from matrix-org/uhoreg/e2e_backup_optional_version
make version optional in body of e2e backup version update
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/e2e_room_keys.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/e2e_room_keys.py b/synapse/handlers/e2e_room_keys.py
index a9d80f708c..0cea445f0d 100644
--- a/synapse/handlers/e2e_room_keys.py
+++ b/synapse/handlers/e2e_room_keys.py
@@ -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
             )