summary refs log tree commit diff
path: root/synapse/storage/devices.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-01-27 10:31:06 +0000
committerErik Johnston <erik@matrix.org>2017-01-27 10:31:06 +0000
commit755adff0e407abd48bd30b544e7025da1381f3d2 (patch)
tree8e5fb9b51b2b1f94040c38dbb8c8d53b1b11600e /synapse/storage/devices.py
parentBetter name (diff)
downloadsynapse-755adff0e407abd48bd30b544e7025da1381f3d2.tar.xz
User if rather than for
Diffstat (limited to 'synapse/storage/devices.py')
-rw-r--r--synapse/storage/devices.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index d46203dd35..ad5411dbe7 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -150,6 +150,8 @@ class DeviceStore(SQLBaseStore):
         )
 
     def mark_remote_user_device_list_as_unsubscribed(self, user_id):
+        """Mark that we no longer track device lists for remote user.
+        """
         return self._simple_delete(
             table="device_lists_remote_extremeties",
             keyvalues={
@@ -394,7 +396,8 @@ class DeviceStore(SQLBaseStore):
             txn, [(user_id, None)], include_all_devices=True
         )
 
-        for user_id, user_devices in devices.iteritems():
+        if devices:
+            user_devices = devices[user_id]
             results = []
             for device_id, device in user_devices.iteritems():
                 result = {