Merge branch 'v5' into 'master'

feat: support room version 5

See merge request famedly/conduit!138
This commit is contained in:
Timo Kösters 2021-07-21 11:05:59 +00:00
commit e0072eff63
6 changed files with 35 additions and 22 deletions

View file

@ -373,7 +373,10 @@ pub async fn upgrade_room_route(
) -> ConduitResult<upgrade_room::Response> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
if !matches!(body.new_version, RoomVersionId::Version6) {
if !matches!(
body.new_version,
RoomVersionId::Version5 | RoomVersionId::Version6
) {
return Err(Error::BadRequest(
ErrorKind::UnsupportedRoomVersion,
"This server does not support that room version.",