mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Add and use M_ROOM_IN_USE (#1972)
Signed-off-by: nivekuil <mail@nivekuil.com> Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
614e67280d
commit
fe5050c0a5
2 changed files with 14 additions and 2 deletions
|
@ -325,7 +325,10 @@ func createRoom(
|
|||
return jsonerror.InternalServerError()
|
||||
}
|
||||
if aliasResp.RoomID != "" {
|
||||
return util.MessageResponse(400, "Alias already exists")
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.RoomInUse("Room ID already exists."),
|
||||
}
|
||||
}
|
||||
|
||||
aliasEvent = &fledglingEvent{
|
||||
|
@ -484,7 +487,10 @@ func createRoom(
|
|||
}
|
||||
|
||||
if aliasResp.AliasExists {
|
||||
return util.MessageResponse(400, "Alias already exists")
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.RoomInUse("Room alias already exists."),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue