diff options
author | Azrenbeth <77782548+Azrenbeth@users.noreply.github.com> | 2021-08-26 13:53:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-26 13:53:57 +0100 |
commit | ad17fbd20eb2dd9fb10a3d02ab1b69e9a0d5b50c (patch) | |
tree | 6d93accd9ad9546467658e5c98aa58361d095551 /synapse/handlers | |
parent | Additional type hints for REST servlets (part 2). (#10674) (diff) | |
download | synapse-ad17fbd20eb2dd9fb10a3d02ab1b69e9a0d5b50c.tar.xz |
Remove pushers when deleting 3pid from account (#10581)
When a user deletes an email from their account it will now also remove all pushers for that email and that user (even if these pushers were created by a different client)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/auth.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 98d3d2d97f..34725324a6 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -1464,6 +1464,10 @@ class AuthHandler(BaseHandler): ) await self.store.user_delete_threepid(user_id, medium, address) + if medium == "email": + await self.store.delete_pusher_by_app_id_pushkey_user_id( + app_id="m.email", pushkey=address, user_id=user_id + ) return result async def hash(self, password: str) -> str: @@ -1732,7 +1736,6 @@ class AuthHandler(BaseHandler): @attr.s(slots=True) class MacaroonGenerator: - hs = attr.ib() def generate_guest_access_token(self, user_id: str) -> str: |