Return 403s on client API

This commit is contained in:
Neil Alexander 2021-11-09 14:15:49 +00:00
parent 4d20122d77
commit dadc00caf1
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -102,6 +102,10 @@ func JoinRoomByIDOrAlias(
JSON: jsonerror.Unknown("The room join will continue in the background."),
}
case result := <-done:
if !result.Is2xx() {
// The only error code in the spec for CS /join is 403.
result.Code = http.StatusForbidden
}
return result
}
}