summary refs log tree commit diff
path: root/synapse/handlers/device.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-07-27 12:18:03 +0100
committerRichard van der Hoff <richard@matrix.org>2016-07-27 12:24:52 +0100
commitd47115ff8bf3ab5952f053db578a519e8e3f930c (patch)
tree95a66e802a76abef0a9a9563e98b6218c1d09ca8 /synapse/handlers/device.py
parentMake the device id on e2e key upload optional (diff)
downloadsynapse-d47115ff8bf3ab5952f053db578a519e8e3f930c.tar.xz
Delete e2e keys on device delete
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r--synapse/handlers/device.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py
index eaead50800..f4bf159bb5 100644
--- a/synapse/handlers/device.py
+++ b/synapse/handlers/device.py
@@ -143,6 +143,10 @@ class DeviceHandler(BaseHandler):
             delete_refresh_tokens=True,
         )
 
+        yield self.store.delete_e2e_keys_by_device(
+            user_id=user_id, device_id=device_id
+        )
+
     @defer.inlineCallbacks
     def update_device(self, user_id, device_id, content):
         """ Update the given device