Update ruma

This commit is contained in:
chenyuqide 2022-03-05 10:16:21 +08:00 committed by Timo Kösters
parent 21bc099ccf
commit ee96a03d60
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
8 changed files with 144 additions and 144 deletions

View file

@ -342,8 +342,12 @@ pub async fn change_password_route(
/// Note: Also works for Application Services
pub async fn whoami_route(body: Ruma<whoami::v3::Request>) -> Result<whoami::v3::Response> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
let device_id = body.sender_device.as_ref().cloned();
let is_guest = device_id.is_none();
Ok(whoami::v3::Response {
user_id: sender_user.clone(),
device_id,
is_guest,
})
}