fix(sync): don't override sliding sync v5 list range start to zero
This commit is contained in:
parent
a43dee1728
commit
052c4dfa21
2 changed files with 4 additions and 1 deletions
1
changelog.d/1445.bugfix
Normal file
1
changelog.d/1445.bugfix
Normal 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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue