mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
SYN-104: When going backwards the end token should be before the last event
This commit is contained in:
parent
11fd81e398
commit
1731af3f29
@ -253,6 +253,9 @@ class StreamStore(SQLBaseStore):
|
|||||||
if rows:
|
if rows:
|
||||||
topo = rows[-1]["topological_ordering"]
|
topo = rows[-1]["topological_ordering"]
|
||||||
toke = rows[-1]["stream_ordering"]
|
toke = rows[-1]["stream_ordering"]
|
||||||
|
if direction == 'b':
|
||||||
|
topo -= 1
|
||||||
|
toke -= 1
|
||||||
next_token = "t%s-%s" % (topo, toke)
|
next_token = "t%s-%s" % (topo, toke)
|
||||||
else:
|
else:
|
||||||
# TODO (erikj): We should work out what to do here instead.
|
# TODO (erikj): We should work out what to do here instead.
|
||||||
|
Loading…
Reference in New Issue
Block a user