mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Update HTTP status codes
It looks like the spec calls for these to be 400, rather than 403: https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-rooms-roomid-forget
This commit is contained in:
parent
7c99beb68a
commit
bddd58d2c2
|
|
@ -426,13 +426,13 @@ func SendForget(
|
|||
}
|
||||
if membershipRes.IsInRoom {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusForbidden,
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.Forbidden("user is still a member of the room"),
|
||||
}
|
||||
}
|
||||
if !membershipRes.HasBeenInRoom {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusForbidden,
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.Forbidden("user did not belong to room"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue