default to main event for batch tokens

fix prev_batch token for legacy sync timeline

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-24 06:04:54 +00:00
parent c519a40cb8
commit 97ad9afc86
3 changed files with 3 additions and 4 deletions

View file

@ -169,12 +169,14 @@ pub(crate) async fn get_context_route(
start: events_before
.last()
.map(at!(0))
.or(Some(base_token))
.as_ref()
.map(ToString::to_string),
end: events_after
.last()
.map(at!(0))
.or(Some(base_token))
.as_ref()
.map(ToString::to_string),