summary refs log tree commit diff
path: root/synapse/handlers/register.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2017-11-29 18:33:34 +0000
committerMatthew Hodgson <matthew@matrix.org>2017-11-29 18:33:34 +0000
commitcd3697e8b781a79b91a9d0c3cb8cc3201e8f3bc8 (patch)
tree57b90c432ab198348fa348e600bb168cc25e1893 /synapse/handlers/register.py
parentuntested WIP but might actually work (diff)
downloadsynapse-cd3697e8b781a79b91a9d0c3cb8cc3201e8f3bc8.tar.xz
kick the user_directory index when new users register
Diffstat (limited to 'synapse/handlers/register.py')
-rw-r--r--synapse/handlers/register.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index f6e7e58563..5db106dfca 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -38,6 +38,7 @@ class RegistrationHandler(BaseHandler):
         self.auth = hs.get_auth()
         self._auth_handler = hs.get_auth_handler()
         self.profile_handler = hs.get_profile_handler()
+        self.user_directory_handler = hs.get_user_directory_handler()
         self.captcha_client = CaptchaServerHttpClient(hs)
 
         self._next_generated_user_id = None
@@ -165,6 +166,13 @@ class RegistrationHandler(BaseHandler):
                 ),
                 admin=admin,
             )
+
+            if self.hs.config.user_directory_include_pattern:
+                profile = yield self.store.get_profileinfo(localpart)
+                yield self.user_directory_handler.handle_local_profile_change(
+                    user_id, profile
+                )
+
         else:
             # autogen a sequential user ID
             attempts = 0