Merge branch 'anoa/no_require_preset' into anoa/testing

This commit is contained in:
Andrew Morgan 2018-06-12 16:26:59 +01:00
commit 1401a102fc

View file

@ -87,6 +87,7 @@ func (r createRoomRequest) Validate() *util.JSONResponse {
}
}
}
if r.Preset != "" {
switch r.Preset {
case presetPrivateChat, presetTrustedPrivateChat, presetPublicChat:
break
@ -96,6 +97,7 @@ func (r createRoomRequest) Validate() *util.JSONResponse {
JSON: jsonerror.BadJSON("preset must be any of 'private_chat', 'trusted_private_chat', 'public_chat'"),
}
}
}
return nil
}