summary refs log tree commit diff
path: root/synapse/storage/devices.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-03-14 11:35:05 +0000
committerErik Johnston <erik@matrix.org>2017-03-14 11:35:05 +0000
commitbb256ac96f2a10b60708d5273bee5df2533f10b8 (patch)
treeae6d19a234b566ff4fc58ec1d7b47c9622843b2c /synapse/storage/devices.py
parentAdd new storage function to slave store (diff)
parentMerge pull request #1996 from matrix-org/erikj/fix_current_state (diff)
downloadsynapse-bb256ac96f2a10b60708d5273bee5df2533f10b8.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/public_list_speed
Diffstat (limited to 'synapse/storage/devices.py')
-rw-r--r--synapse/storage/devices.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index bd56ba2515..563071b7a9 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -108,6 +108,23 @@ class DeviceStore(SQLBaseStore):
             desc="delete_device",
         )
 
+    def delete_devices(self, user_id, device_ids):
+        """Deletes several devices.
+
+        Args:
+            user_id (str): The ID of the user which owns the devices
+            device_ids (list): The IDs of the devices to delete
+        Returns:
+            defer.Deferred
+        """
+        return self._simple_delete_many(
+            table="devices",
+            column="device_id",
+            iterable=device_ids,
+            keyvalues={"user_id": user_id},
+            desc="delete_devices",
+        )
+
     def update_device(self, user_id, device_id, new_display_name=None):
         """Update a device.