mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-14 18:33:09 -06:00
Don't require preset to create room
This commit is contained in:
parent
78440083df
commit
7d246f906a
|
|
@ -87,13 +87,15 @@ func (r createRoomRequest) Validate() *util.JSONResponse {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch r.Preset {
|
if r.Preset != "" {
|
||||||
case presetPrivateChat, presetTrustedPrivateChat, presetPublicChat:
|
switch r.Preset {
|
||||||
break
|
case presetPrivateChat, presetTrustedPrivateChat, presetPublicChat:
|
||||||
default:
|
break
|
||||||
return &util.JSONResponse{
|
default:
|
||||||
Code: http.StatusBadRequest,
|
return &util.JSONResponse{
|
||||||
JSON: jsonerror.BadJSON("preset must be any of 'private_chat', 'trusted_private_chat', 'public_chat'"),
|
Code: http.StatusBadRequest,
|
||||||
|
JSON: jsonerror.BadJSON("preset must be any of 'private_chat', 'trusted_private_chat', 'public_chat'"),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue