summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-02-25 13:56:55 +0000
committerGitHub <noreply@github.com>2021-02-25 13:56:55 +0000
commit1e62d9ee8cb049d752af4d4f6237fd7e412800d8 (patch)
tree1b1ac427fca7c2f84f98eccfda39512f2a6759eb /synapse/handlers
parentMerge branch 'master' into develop (diff)
downloadsynapse-1e62d9ee8cb049d752af4d4f6237fd7e412800d8.tar.xz
Ensure pushers are deleted for deactivated accounts (#9285)
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/deactivate_account.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py
index 94f3f3163f..3886d3124d 100644
--- a/synapse/handlers/deactivate_account.py
+++ b/synapse/handlers/deactivate_account.py
@@ -120,6 +120,11 @@ class DeactivateAccountHandler(BaseHandler):
 
         await self.store.user_set_password_hash(user_id, None)
 
+        # Most of the pushers will have been deleted when we logged out the
+        # associated devices above, but we still need to delete pushers not
+        # associated with devices, e.g. email pushers.
+        await self.store.delete_all_pushers_for_user(user_id)
+
         # 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)