aerc/worker/imap/create.go

20 lines
426 B
Go
Raw Permalink Normal View History

package imap
import (
"git.sr.ht/~rjarry/aerc/worker/types"
)
func (imapw *IMAPWorker) handleCreateDirectory(msg *types.CreateDirectory) {
if err := imapw.client.Create(msg.Directory); err != nil {
2019-07-11 06:49:09 +02:00
if msg.Quiet {
return
}
imapw.worker.PostMessage(&types.Error{
Message: types.RespondTo(msg),
Error: err,
}, nil)
} else {
imapw.worker.PostMessage(&types.Done{Message: types.RespondTo(msg)}, nil)
}
}