summary refs log tree commit diff
path: root/synapse/handlers/deactivate_account.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/handlers/deactivate_account.py')
-rw-r--r--synapse/handlers/deactivate_account.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py

index 2bcd8f5435..9167918257 100644 --- a/synapse/handlers/deactivate_account.py +++ b/synapse/handlers/deactivate_account.py
@@ -50,7 +50,7 @@ class DeactivateAccountHandler(BaseHandler): if hs.config.run_background_tasks: hs.get_reactor().callWhenRunning(self._start_user_parting) - self._account_validity_enabled = hs.config.account_validity.enabled + self._account_validity_enabled = hs.config.account_validity_enabled async def deactivate_account( self, @@ -125,6 +125,11 @@ class DeactivateAccountHandler(BaseHandler): # associated with devices, e.g. email pushers. await self.store.delete_all_pushers_for_user(user_id) + # Set the user as no longer active. This will prevent their profile + # from being replicated. + user = UserID.from_string(user_id) + await self._profile_handler.set_active([user], False, False) + # Add the user to a table of users pending deactivation (ie. # removal from all the rooms they're a member of) await self.store.add_user_pending_deactivation(user_id)