1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py
index 45d2404dde..d61da72efc 100644
--- a/synapse/handlers/deactivate_account.py
+++ b/synapse/handlers/deactivate_account.py
@@ -126,6 +126,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)
|