Create appservice user on registration.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -109,6 +109,18 @@ impl Service {
|
|||||||
registration: &Registration,
|
registration: &Registration,
|
||||||
appservice_config_body: &str,
|
appservice_config_body: &str,
|
||||||
) -> Result {
|
) -> 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
|
//TODO: Check for collisions between exclusive appservice namespaces
|
||||||
self.registration_info
|
self.registration_info
|
||||||
.write()
|
.write()
|
||||||
|
|||||||
Reference in New Issue
Block a user