Compare commits

..

1 commit

Author SHA1 Message Date
Nyx
6b2770f914 Add /_continuwuity/ paths 2025-07-12 03:50:26 -05:00

View file

@ -298,9 +298,7 @@ pub(crate) async fn register_route(
session: None, session: None,
auth_error: None, auth_error: None,
}; };
let skip_auth = body.appservice_info.is_some() || is_guest; let mut skip_auth = body.appservice_info.is_some();
// Populate required UIAA flows
if services.globals.registration_token.is_some() { if services.globals.registration_token.is_some() {
// Registration token required // Registration token required
uiaainfo.flows.push(AuthFlow { uiaainfo.flows.push(AuthFlow {
@ -319,10 +317,9 @@ pub(crate) async fn register_route(
}, },
})) }))
.expect("Failed to serialize recaptcha params"); .expect("Failed to serialize recaptcha params");
skip_auth = skip_auth || is_guest;
} }
} } else {
if uiaainfo.flows.is_empty() && !skip_auth {
// No registration token necessary, but clients must still go through the flow // No registration token necessary, but clients must still go through the flow
uiaainfo = UiaaInfo { uiaainfo = UiaaInfo {
flows: vec![AuthFlow { stages: vec![AuthType::Dummy] }], flows: vec![AuthFlow { stages: vec![AuthType::Dummy] }],
@ -331,6 +328,7 @@ pub(crate) async fn register_route(
session: None, session: None,
auth_error: None, auth_error: None,
}; };
skip_auth = skip_auth || is_guest;
} }
if !skip_auth { if !skip_auth {