make version optional in body of e2e backup version update

to agree with latest version of the MSC
This commit is contained in:
Hubert Chathi 2019-10-09 17:54:03 -04:00
parent def5413480
commit 4535a07f4a
3 changed files with 34 additions and 19 deletions

View file

@ -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
)