1
0

Merge pull request #6189 from matrix-org/uhoreg/e2e_backup_optional_version

make version optional in body of e2e backup version update
This commit is contained in:
Hubert Chathi
2019-10-11 10:11:59 -04:00
committed by GitHub
4 changed files with 35 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
)

View File

@@ -375,7 +375,7 @@ class RoomKeysVersionServlet(RestServlet):
"ed25519:something": "hijklmnop"
}
},
"version": "42"
"version": "12345"
}
HTTP/1.1 200 OK