Send unilateral responses before sending OK

This commit is contained in:
Michal Horejsek
2020-11-24 14:53:38 +01:00
parent 33dfc5ce09
commit f469d34781
22 changed files with 370 additions and 268 deletions

View File

@ -177,6 +177,9 @@ func (im *imapMailbox) Check() error {
// Expunge permanently removes all messages that have the \Deleted flag set
// from the currently selected mailbox.
func (im *imapMailbox) Expunge() error {
im.user.backend.setUpdatesBeBlocking(im.user.currentAddressLowercase, im.name, operationDeleteMessage)
defer im.user.backend.unsetUpdatesBeBlocking(im.user.currentAddressLowercase, im.name, operationDeleteMessage)
return im.storeMailbox.RemoveDeleted()
}