Fix sync handling for appservices calling without device_id

This commit is contained in:
dasha_uwu
2025-12-14 11:25:58 +05:00
committed by Jason Volk
parent 7b2079f714
commit 0c7ba1dd5a
15 changed files with 118 additions and 74 deletions

View File

@@ -23,7 +23,7 @@ pub(crate) async fn logout_route(
) -> Result<logout::v3::Response> {
services
.users
.remove_device(body.sender_user(), body.sender_device())
.remove_device(body.sender_user(), body.sender_device()?)
.await;
Ok(logout::v3::Response::new())

View File

@@ -50,7 +50,8 @@ pub(crate) async fn login_token_route(
// This route SHOULD have UIA
// TODO: How do we make only UIA sessions that have not been used before valid?
let (sender_user, sender_device) = body.sender();
let sender_user = body.sender_user();
let sender_device = body.sender_device()?;
let password_flow = uiaa::AuthFlow { stages: vec![uiaa::AuthType::Password] };