summary refs log tree commit diff
path: root/synapse/storage/devices.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-03-31 10:21:40 +0100
committerErik Johnston <erik@matrix.org>2017-03-31 10:21:40 +0100
commitfb5daca9946f54953179ba86d877bb5f70f3c30f (patch)
treeb40bfe275ab9fc7a4021a3475b9ec19ba275e3c5 /synapse/storage/devices.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentRemove user from process_presence when stops syncing (diff)
downloadsynapse-matrix-org-hotfixes-tcp-repl.tar.xz
Merge branch 'erikj/repl_tcp_server' of github.com:matrix-org/synapse into matrix-org-hotfixes-tcp-repl github/matrix-org-hotfixes-tcp-repl matrix-org-hotfixes-tcp-repl
Diffstat (limited to 'synapse/storage/devices.py')
-rw-r--r--synapse/storage/devices.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/devices.py b/synapse/storage/devices.py

index 53e36791d5..c8d5f5ba8b 100644 --- a/synapse/storage/devices.py +++ b/synapse/storage/devices.py
@@ -533,7 +533,7 @@ class DeviceStore(SQLBaseStore): rows = yield self._execute("get_user_whose_devices_changed", None, sql, from_key) defer.returnValue(set(row[0] for row in rows)) - def get_all_device_list_changes_for_remotes(self, from_key): + def get_all_device_list_changes_for_remotes(self, from_key, to_key): """Return a list of `(stream_id, user_id, destination)` which is the combined list of changes to devices, and which destinations need to be poked. `destination` may be None if no destinations need to be poked. @@ -541,11 +541,11 @@ class DeviceStore(SQLBaseStore): sql = """ SELECT stream_id, user_id, destination FROM device_lists_stream LEFT JOIN device_lists_outbound_pokes USING (stream_id, user_id, device_id) - WHERE stream_id > ? + WHERE ? < stream_id AND stream_id <= ? """ return self._execute( "get_all_device_list_changes_for_remotes", None, - sql, from_key, + sql, from_key, to_key ) @defer.inlineCallbacks