summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-03-06 11:52:46 +0000
committerGitHub <noreply@github.com>2017-03-06 11:52:46 +0000
commitc98d91fe94b4783b0a0b800a0d2cbe5f1d3419ea (patch)
tree8c8644b20ab01edc8b8ec655d8687373e5f14de0 /synapse
parentMerge pull request #1964 from matrix-org/erikj/device_list_update_fix (diff)
parentSelect distinct devices from DB (diff)
downloadsynapse-c98d91fe94b4783b0a0b800a0d2cbe5f1d3419ea.tar.xz
Merge pull request #1969 from matrix-org/erikj/get_distinct_devices
Select distinct devices from DB
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/devices.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py
index 81c43d31f6..bd56ba2515 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -508,7 +508,7 @@ class DeviceStore(SQLBaseStore):
             defer.returnValue(set(changed))
 
         sql = """
-            SELECT user_id FROM device_lists_stream WHERE stream_id > ?
+            SELECT DISTINCT user_id FROM device_lists_stream WHERE stream_id > ?
         """
         rows = yield self._execute("get_user_whose_devices_changed", None, sql, from_key)
         defer.returnValue(set(row[0] for row in rows))