summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/storage/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 4551cf8774..ac264b5d25 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -376,7 +376,7 @@ class DataStore(RoomMemberStore, RoomStore,
                     FROM user_ips AS u
                     LEFT JOIN (
                       SELECT user_id, device_id, timestamp FROM user_daily_visits
-                      WHERE timestamp IS ?
+                      WHERE timestamp = ?
                     ) udv
                     ON u.user_id = udv.user_id AND u.device_id=udv.device_id
                     WHERE last_seen > ? AND last_seen <= ? AND udv.timestamp IS NULL