fix: Adjust error codes to comply with MSC4190

This commit is contained in:
Ginger committed 2026-06-29 09:35:50 -04:00
1 parent 74788dcb19
commit 52ec6bc6da
2 files changed
+26 -14

No files matched your search

+8
View File
@@ -104,6 +104,14 @@ pub(crate) async fn register_route(
};
let (token, device) = if !body.inhibit_login {
// If UIAA is disabled, we can't create a device. In that case only appservices
// can reach this point in the first place, so we return an error for them.
if !services.config.oauth.compatibility_mode.uiaa_available() {
return Err!(Request(AppserviceLoginUnsupported(
"User-interactive appservice registration is not available on this server."
)));
}
// Generate new device id if the user didn't specify one
let device_id = body
.device_id