Update ruma

This commit is contained in:
chenyuqide 2022-03-04 08:08:32 +08:00 committed by Timo Kösters
parent 1ce03059a0
commit 21bc099ccf
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
4 changed files with 38 additions and 36 deletions

View file

@ -51,8 +51,8 @@ pub async fn login_route(
identifier,
password,
}) => {
let username = if let IncomingUserIdentifier::MatrixId(matrix_id) = identifier {
matrix_id.to_lowercase()
let username = if let IncomingUserIdentifier::UserIdOrLocalpart(user_id) = identifier {
user_id.to_lowercase()
} else {
return Err(Error::BadRequest(ErrorKind::Forbidden, "Bad login type."));
};