fix(appservice): Create user on authentication for existing appservices

Ensures appservice users are created during authentication requests,
fixing the issue for appservices registered before the initial fix.
This allows existing appservices to work without re-registration.
This commit is contained in:
Tom Foster 2025-08-04 20:27:56 +01:00
commit 3e68b67562

View file

@ -220,6 +220,10 @@ async fn auth_appservice(
return Err!(Request(Exclusive("User is not in namespace."))); return Err!(Request(Exclusive("User is not in namespace.")));
} }
if !services.users.exists(&user_id).await {
services.users.create(&user_id, None)?;
}
Ok(Auth { Ok(Auth {
origin: None, origin: None,
sender_user: Some(user_id), sender_user: Some(user_id),