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

This commit is contained in:
Niklas Wojtkowiak
2026-02-23 17:14:37 -05:00
committed by Ellis Git
parent a43dee1728
commit 052c4dfa21
2 changed files with 4 additions and 1 deletions
+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();
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