mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 03:26:37 +03:00
imapserver: implement the MULTISEARCH extension, with its ESEARCH command
This commit is contained in:
@ -965,6 +965,23 @@ func (sk searchKey) hasModseq() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Whether we need message sequence numbers to evaluate. If not, we cannot optimize
|
||||
// when only MAX is requested through a reverse query.
|
||||
func (sk searchKey) needSeq() bool {
|
||||
for _, k := range sk.searchKeys {
|
||||
if k.needSeq() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if sk.searchKey != nil && sk.searchKey.needSeq() {
|
||||
return true
|
||||
}
|
||||
if sk.searchKey2 != nil && sk.searchKey2.needSeq() {
|
||||
return true
|
||||
}
|
||||
return sk.seqSet != nil && !sk.seqSet.searchResult
|
||||
}
|
||||
|
||||
// ../rfc/9051:6489 ../rfc/3501:4692
|
||||
func (p *parser) xdateDay() int {
|
||||
d := p.xdigit()
|
||||
|
Reference in New Issue
Block a user