summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 ad5411dbe7..918520269e 100644
--- a/synapse/storage/devices.py
+++ b/synapse/storage/devices.py
@@ -260,7 +260,7 @@ class DeviceStore(SQLBaseStore):
                                    now_stream_id):
         sql = """
             SELECT user_id, device_id, max(stream_id) FROM device_lists_outbound_pokes
-            WHERE destination = ? AND stream_id > ? AND stream_id <= ? AND sent = ?
+            WHERE destination = ? AND ? < stream_id AND stream_id <= ? AND sent = ?
             GROUP BY user_id, device_id
         """
         txn.execute(