Update ruma
This commit is contained in:
@@ -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."));
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ use ruma::{
|
||||
api::client::{
|
||||
error::ErrorKind,
|
||||
uiaa::{
|
||||
AuthType, IncomingAuthData, IncomingPassword, IncomingUserIdentifier::MatrixId,
|
||||
AuthType, IncomingAuthData, IncomingPassword, IncomingUserIdentifier::UserIdOrLocalpart,
|
||||
UiaaInfo,
|
||||
},
|
||||
},
|
||||
@@ -74,7 +74,7 @@ impl Uiaa {
|
||||
..
|
||||
}) => {
|
||||
let username = match identifier {
|
||||
MatrixId(username) => username,
|
||||
UserIdOrLocalpart(username) => username,
|
||||
_ => {
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::Unrecognized,
|
||||
|
||||
Reference in New Issue
Block a user