Fix JMAP sorting order issues when emails lack receivedAt headers
This commit is contained in:
@@ -13,6 +13,7 @@ This version includes **multiple breaking changes**. If you are upgrading from v
|
||||
## Fixed
|
||||
- JMAP:
|
||||
- Invalid `receivedAt` headers after importing (#2939).
|
||||
- Sorting order issues when emails lack `receivedAt` headers.
|
||||
- Reverse proxy issues.
|
||||
- OSS builds.
|
||||
- DNS Updater:
|
||||
|
||||
@@ -204,11 +204,14 @@ impl QueryResults {
|
||||
!set.contains(*b) as u32,
|
||||
*ascending,
|
||||
),
|
||||
SearchComparator::SortedSet { set, ascending } => (
|
||||
*set.get(a).unwrap_or(&u32::MAX),
|
||||
*set.get(b).unwrap_or(&u32::MAX),
|
||||
*ascending,
|
||||
),
|
||||
SearchComparator::SortedSet { set, ascending } => {
|
||||
let missing = if *ascending { u32::MAX } else { 0 };
|
||||
(
|
||||
*set.get(a).unwrap_or(&missing),
|
||||
*set.get(b).unwrap_or(&missing),
|
||||
*ascending,
|
||||
)
|
||||
}
|
||||
SearchComparator::Field { .. } => continue,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user