Create appservice user on registration.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
9253f46c80
commit
46193de7e8
1 changed files with 12 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue