Browse Source

Fix query for get_unread_push_actions_for_user_in_range

Erik Johnston 8 years ago
parent
commit
a2546b9082
1 changed files with 2 additions and 1 deletions
  1. 2 1
      synapse/storage/event_push_actions.py

+ 2 - 1
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"
             )