summaryrefslogtreecommitdiff
path: root/lib/msgstore.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-07-26 13:48:27 +0200
committerRobin Jarry <robin@jarry.cc>2022-07-26 22:22:58 +0200
commit26b9c3d9665db0d5a7990f75fc1baccc0139e7a5 (patch)
tree43aa32aa01cd9acc4b088020b6a2e2e28f79faa2 /lib/msgstore.go
parentcfbb548fb86fb81b69809f9f1b68bbb60e823a40 (diff)
downloadaerc-26b9c3d9665db0d5a7990f75fc1baccc0139e7a5.zip
sort: show warning when sort is not supported
Use the capabilities returned by the backend to check whether sort is implemented when the user tries to use the sort command. Print a warning to the log when a sort request is silently dropped by the backend. Suggested-by: |cos| Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r--lib/msgstore.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 783ce5d..c9f8fd9 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -847,3 +847,8 @@ func (store *MessageStore) FindIndexByUid(uid uint32) int {
}
return -1
}
+
+// Capabilities returns a models.Capabilities struct or nil if not available
+func (store *MessageStore) Capabilities() *models.Capabilities {
+ return store.DirInfo.Caps
+}