mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
Fix return codes
This commit is contained in:
parent
831f3b9307
commit
35bc2e98e6
2 changed files with 2 additions and 3 deletions
|
@ -81,7 +81,6 @@ func JoinRoomByIDOrAlias(
|
|||
defer close(done)
|
||||
rsAPI.PerformJoin(req.Context(), &joinReq, &joinRes)
|
||||
if joinRes.Error != nil {
|
||||
joinRes.Error.RemoteCode = http.StatusForbidden
|
||||
done <- joinRes.Error.JSONResponse()
|
||||
} else {
|
||||
done <- util.JSONResponse{
|
||||
|
|
|
@ -322,8 +322,8 @@ func attemptMakeJoinForRestrictedMembership(
|
|||
|
||||
logger.Error("No room matching join rule memberships found")
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.UnableToAuthoriseJoin("You are not joined to any allowed rooms"),
|
||||
Code: http.StatusForbidden,
|
||||
JSON: jsonerror.Forbidden("You are not joined to any allowed rooms"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue