diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-29 13:28:02 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-29 13:28:06 +0100 |
commit | ee06023573811a06853d28b613cc823282aa3490 (patch) | |
tree | 0def411f45674ae0e631465d0fbbf1d40c9fadd8 /synapse/storage/stream.py | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into develop (diff) | |
download | synapse-ee06023573811a06853d28b613cc823282aa3490.tar.xz |
Get the equalities right.
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r-- | synapse/storage/stream.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index 4945b0796e..0b78222827 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -205,8 +205,11 @@ class StreamStore(SQLBaseStore): with_feedback=False): # TODO (erikj): Handle compressed feedback - from_comp = '<' if direction =='b' else '>' - to_comp = '>' if direction =='b' else '<' + # Tokens really represent positions between elements, but we use + # the convention of pointing to the event before the gap. Hence + # we have a bit of asymmetry when it comes to equalities. + from_comp = '<=' if direction =='b' else '>' + to_comp = '>' if direction =='b' else '<=' order = "DESC" if direction == 'b' else "ASC" args = [room_id] |