summary refs log tree commit diff
path: root/synapse/storage/event_push_actions.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-04-14 11:08:31 +0100
committerErik Johnston <erik@matrix.org>2016-04-14 11:08:31 +0100
commita2546b9082b54bd7fc6e0580da4afa84d571fce8 (patch)
tree0e70f74d0ea16d1ac3433714aaae98ac5dc691dc /synapse/storage/event_push_actions.py
parentMerge pull request #721 from matrix-org/erikj/spider (diff)
downloadsynapse-a2546b9082b54bd7fc6e0580da4afa84d571fce8.tar.xz
Fix query for get_unread_push_actions_for_user_in_range
Diffstat (limited to 'synapse/storage/event_push_actions.py')
-rw-r--r--synapse/storage/event_push_actions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/event_push_actions.py b/synapse/storage/event_push_actions.py
index 88737b7a6c..86a98b6f11 100644
--- a/synapse/storage/event_push_actions.py
+++ b/synapse/storage/event_push_actions.py
@@ -133,9 +133,10 @@ class EventPushActionsStore(SQLBaseStore):
                 "       ep.topological_ordering > rl.topological_ordering"
                 "       OR ("
                 "           ep.topological_ordering = rl.topological_ordering"
-                "           AND ep.stream_ordering > ?"
+                "           AND ep.stream_ordering > rl.stream_ordering"
                 "       )"
                 "   )"
+                "   AND ep.stream_ordering > ?"
                 "   AND ep.user_id = ?"
                 "   AND ep.user_id = rl.user_id"
             )