fix(sync): don't override sliding sync v5 list range start to zero

This commit is contained in:
Niklas Wojtkowiak authored and Ellis Git committed 2026-02-24 13:59:33 +00:00
1 parent a43dee1728
commit 052c4dfa21
2 files changed
+4 -1

No files matched your search

+1
View File
@@ -0,0 +1 @@
Fixed sliding sync v5 list ranges always starting from 0, causing extra rooms to be unnecessarily processed and returned. Contributed by @0xnim
+3 -1
View File
@@ -336,7 +336,9 @@ where
let ranges = list.ranges.clone(); let ranges = list.ranges.clone();
for mut range in ranges { for mut range in ranges {
range.0 = uint!(0); range.0 = range
.0
.min(UInt::try_from(active_rooms.len()).unwrap_or(UInt::MAX));
range.1 = range.1.checked_add(uint!(1)).unwrap_or(range.1); range.1 = range.1.checked_add(uint!(1)).unwrap_or(range.1);
range.1 = range range.1 = range
.1 .1