diff options
author | David Baker <dbkr@users.noreply.github.com> | 2018-05-24 16:12:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 16:12:12 +0100 |
commit | ecc4b88bd14cbf8eeb3029e4b291639f26fe3b30 (patch) | |
tree | 795fa10980c07d1ddcaa6164f1328adaecd5328a /synapse/handlers/deactivate_account.py | |
parent | Merge pull request #3243 from NotAFile/py3-six-3 (diff) | |
parent | Remove users from user directory on deactivate (diff) | |
download | synapse-ecc4b88bd14cbf8eeb3029e4b291639f26fe3b30.tar.xz |
Merge pull request #3277 from matrix-org/dbkr/remove_from_user_dir
Remove users from user directory on deactivate
Diffstat (limited to 'synapse/handlers/deactivate_account.py')
-rw-r--r-- | synapse/handlers/deactivate_account.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py index d58ea6c650..c5e92f6214 100644 --- a/synapse/handlers/deactivate_account.py +++ b/synapse/handlers/deactivate_account.py @@ -30,6 +30,7 @@ class DeactivateAccountHandler(BaseHandler): self._auth_handler = hs.get_auth_handler() self._device_handler = hs.get_device_handler() self._room_member_handler = hs.get_room_member_handler() + self.user_directory_handler = hs.get_user_directory_handler() # Flag that indicates whether the process to part users from rooms is running self._user_parter_running = False @@ -65,6 +66,9 @@ class DeactivateAccountHandler(BaseHandler): # removal from all the rooms they're a member of) yield self.store.add_user_pending_deactivation(user_id) + # delete from user directory + yield self.user_directory_handler.handle_user_deactivated(user_id) + # Now start the process that goes through that list and # parts users from rooms (if it isn't already running) self._start_user_parting() |