diff options
author | Mathieu Velten <mathieuv@matrix.org> | 2023-04-14 14:12:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-14 14:12:37 +0200 |
commit | dabbb94fafd335966bbdb5bd2187678872731a0d (patch) | |
tree | dfe27a9cf71696ca300cdcc53d4560ce1d6b1a71 /synapse/handlers/device.py | |
parent | Convert async to normal tests in `TestSSOHandler` (#15433) (diff) | |
download | synapse-dabbb94fafd335966bbdb5bd2187678872731a0d.tar.xz |
Delete pushers after calling on_logged_out module hook on device delete (#15410)
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index d2063d4435..ae1d9337ad 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -513,8 +513,6 @@ class DeviceHandler(DeviceWorkerHandler): else: raise - await self.hs.get_pusherpool().remove_pushers_by_devices(user_id, device_ids) - # Delete data specific to each device. Not optimised as it is not # considered as part of a critical path. for device_id in device_ids: @@ -533,6 +531,10 @@ class DeviceHandler(DeviceWorkerHandler): f"org.matrix.msc3890.local_notification_settings.{device_id}", ) + # Pushers are deleted after `delete_access_tokens_for_user` is called so that + # modules using `on_logged_out` hook can use them if needed. + await self.hs.get_pusherpool().remove_pushers_by_devices(user_id, device_ids) + await self.notify_device_update(user_id, device_ids) async def update_device(self, user_id: str, device_id: str, content: dict) -> None: |