diff options
author | Erik Johnston <erikj@jki.re> | 2017-03-06 11:52:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-06 11:52:46 +0000 |
commit | c98d91fe94b4783b0a0b800a0d2cbe5f1d3419ea (patch) | |
tree | 8c8644b20ab01edc8b8ec655d8687373e5f14de0 | |
parent | Merge pull request #1964 from matrix-org/erikj/device_list_update_fix (diff) | |
parent | Select distinct devices from DB (diff) | |
download | synapse-c98d91fe94b4783b0a0b800a0d2cbe5f1d3419ea.tar.xz |
Merge pull request #1969 from matrix-org/erikj/get_distinct_devices
Select distinct devices from DB
-rw-r--r-- | synapse/storage/devices.py | 2 |
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)) |