aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-06-05 16:25:05 +0200
committerRobin Jarry <robin@jarry.cc>2024-06-05 17:53:27 +0200
commit73bcb4661460d44817de2904fec14a69af819f43 (patch)
tree20e504f4ed43f9a9c477fae91266639fd3340714
parenta5bd99ca7b7e575be7d87fa7882be0b52f6d0261 (diff)
downloadaerc-73bcb4661460d44817de2904fec14a69af819f43.tar.gz
jmap: fix message list order direction
Since the update to go-jmap 0.5.0, the IsAscending property is now taken into account even if it is false. The initial JMAP implementation wrongfully assumed the behaviour and inverted the sort -r logic. Fix that so that messages are ordered as expected. Link: https://git.sr.ht/~rockorager/go-jmap/commit/1db959676c10398a8 Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
-rw-r--r--worker/jmap/directories.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/worker/jmap/directories.go b/worker/jmap/directories.go
index 2b253975..66875cc7 100644
--- a/worker/jmap/directories.go
+++ b/worker/jmap/directories.go
@@ -349,7 +349,7 @@ func translateSort(criteria []*types.SortCriterion) []*email.SortComparator {
default:
continue
}
- cmp.IsAscending = !s.Reverse
+ cmp.IsAscending = s.Reverse
sort = append(sort, &cmp)
}