summary refs log tree commit diff
path: root/synapse/handlers/e2e_room_keys.py
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-10-09 17:54:03 -0400
committerHubert Chathi <hubert@uhoreg.ca>2019-10-09 17:54:03 -0400
commit4535a07f4af0854eed0cfd171e4032bdd3f39cbb (patch)
tree7b073eee4b3b726b57249d671f95788f2f44a12a /synapse/handlers/e2e_room_keys.py
parentMerge pull request #6185 from matrix-org/erikj/fix_censored_evnets (diff)
downloadsynapse-4535a07f4af0854eed0cfd171e4032bdd3f39cbb.tar.xz
make version optional in body of e2e backup version update
to agree with latest version of the MSC
Diffstat (limited to 'synapse/handlers/e2e_room_keys.py')
-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
             )