mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-16 05:36:50 +00:00
Create appservice user on registration.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
9253f46c80
commit
46193de7e8
1 file changed
+12
@@ -109,6 +109,18 @@ impl Service {
|
||||
registration: &Registration,
|
||||
appservice_config_body: &str,
|
||||
) -> Result {
|
||||
let appservice_user = UserId::parse_with_server_name(
|
||||
®istration.sender_localpart,
|
||||
&self.services.config.server_name,
|
||||
)?;
|
||||
|
||||
if !self.services.users.exists(&appservice_user).await {
|
||||
self.services
|
||||
.users
|
||||
.create(&appservice_user, None, None)
|
||||
.await?;
|
||||
}
|
||||
|
||||
//TODO: Check for collisions between exclusive appservice namespaces
|
||||
self.registration_info
|
||||
.write()
|
||||
|
||||
Reference in new issue
Block a user