mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 10:04:06 -04:00
Fix returning incorrect prev_batch token in incremental sync (#8486)
This commit is contained in:
parent
d373ec2f72
commit
9ca6341969
2 changed files with 7 additions and 1 deletions
|
@ -460,8 +460,13 @@ class SyncHandler:
|
|||
recents = []
|
||||
|
||||
if not limited or block_all_timeline:
|
||||
prev_batch_token = now_token
|
||||
if recents:
|
||||
room_key = recents[0].internal_metadata.before
|
||||
prev_batch_token = now_token.copy_and_replace("room_key", room_key)
|
||||
|
||||
return TimelineBatch(
|
||||
events=recents, prev_batch=now_token, limited=False
|
||||
events=recents, prev_batch=prev_batch_token, limited=False
|
||||
)
|
||||
|
||||
filtering_factor = 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue