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>
This commit is contained in:
Koni Marti 2022-07-26 13:48:27 +02:00 committed by Robin Jarry
commit 26b9c3d966
3 changed files with 13 additions and 0 deletions

View file

@ -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
}