diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-11-18 16:44:52 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-11-18 16:45:06 +0000 |
commit | 1731af3f29d21fc9ff69166c79391573c7a9a60e (patch) | |
tree | c5ea275c4df52ed29e9aa17b5e8999b8143f59e0 /synapse/storage/stream.py | |
parent | Merge pull request #17 from matrix-org/room-initial-sync (diff) | |
download | synapse-1731af3f29d21fc9ff69166c79391573c7a9a60e.tar.xz |
SYN-104: When going backwards the end token should be before the last event
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/stream.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index 475e7f20a1..a954024678 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -253,6 +253,9 @@ class StreamStore(SQLBaseStore): if rows: topo = rows[-1]["topological_ordering"] toke = rows[-1]["stream_ordering"] + if direction == 'b': + topo -= 1 + toke -= 1 next_token = "t%s-%s" % (topo, toke) else: # TODO (erikj): We should work out what to do here instead. |