summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2022-01-24 13:37:00 +0000
committerGitHub <noreply@github.com>2022-01-24 13:37:00 +0000
commitdf54c8485a286dbefaa038319399ef8985d5344e (patch)
tree57e998b3db672ff95260d7567e81bf7b755023b1 /synapse/handlers
parentDrop support for and remove references to EOL Python 3.6 (#11683) (diff)
downloadsynapse-df54c8485a286dbefaa038319399ef8985d5344e.tar.xz
Remove account data (including client config, push rules and ignored users) upon user deactivation. (#11621)
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/deactivate_account.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py
index bee62cf360..7a13d76a68 100644
--- a/synapse/handlers/deactivate_account.py
+++ b/synapse/handlers/deactivate_account.py
@@ -157,6 +157,9 @@ class DeactivateAccountHandler:
         # Mark the user as deactivated.
         await self.store.set_user_deactivated_status(user_id, True)
 
+        # Remove account data (including ignored users and push rules).
+        await self.store.purge_account_data_for_user(user_id)
+
         return identity_server_supports_unbinding
 
     async def _reject_pending_invites_for_user(self, user_id: str) -> None: