From 3e68b67562a07e506c4021412d867e7d6840023c Mon Sep 17 00:00:00 2001 From: Tom Foster Date: Mon, 4 Aug 2025 20:27:56 +0100 Subject: [PATCH] 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. --- src/api/router/auth.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/router/auth.rs b/src/api/router/auth.rs index 01254c32..add596c6 100644 --- a/src/api/router/auth.rs +++ b/src/api/router/auth.rs @@ -220,6 +220,10 @@ async fn auth_appservice( return Err!(Request(Exclusive("User is not in namespace."))); } + if !services.users.exists(&user_id).await { + services.users.create(&user_id, None)?; + } + Ok(Auth { origin: None, sender_user: Some(user_id),