diff options
author | David Baker <dbkr@users.noreply.github.com> | 2017-11-01 16:26:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-01 16:26:06 +0000 |
commit | c9b9ef575b02c6ece501a0bbdeacff66129cffcc (patch) | |
tree | 0fdeaac7556bde98a40dd160dd9a719c7868987f /synapse/handlers/device.py | |
parent | Merge pull request #2617 from matrix-org/matthew/auto-displayname (diff) | |
parent | Merge remote-tracking branch 'origin/develop' into rav/refactor_accesstoken_d... (diff) | |
download | synapse-c9b9ef575b02c6ece501a0bbdeacff66129cffcc.tar.xz |
Merge pull request #2621 from matrix-org/rav/refactor_accesstoken_delete
Move access token deletion into auth handler
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 94fc08446b..579d8477ba 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -34,6 +34,7 @@ class DeviceHandler(BaseHandler): self.hs = hs self.state = hs.get_state_handler() + self._auth_handler = hs.get_auth_handler() self.federation_sender = hs.get_federation_sender() self.federation = hs.get_replication_layer() @@ -159,7 +160,7 @@ class DeviceHandler(BaseHandler): else: raise - yield self.store.user_delete_access_tokens( + yield self._auth_handler.delete_access_tokens_for_user( user_id, device_id=device_id, ) @@ -193,7 +194,7 @@ class DeviceHandler(BaseHandler): # Delete access tokens and e2e keys for each device. Not optimised as it is not # considered as part of a critical path. for device_id in device_ids: - yield self.store.user_delete_access_tokens( + yield self._auth_handler.delete_access_tokens_for_user( user_id, device_id=device_id, ) yield self.store.delete_e2e_keys_by_device( |