2019-06-08 19:41:56 +02:00
|
|
|
package imap
|
|
|
|
|
|
|
|
import (
|
2021-11-05 10:19:46 +01:00
|
|
|
"git.sr.ht/~rjarry/aerc/worker/types"
|
2019-06-08 19:41:56 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
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 {
|
2019-06-08 19:41:56 +02:00
|
|
|
return
|
|
|
|
}
|
|
|
|
imapw.worker.PostMessage(&types.Error{
|
|
|
|
Message: types.RespondTo(msg),
|
|
|
|
Error: err,
|
|
|
|
}, nil)
|
|
|
|
} else {
|
|
|
|
imapw.worker.PostMessage(&types.Done{types.RespondTo(msg)}, nil)
|
|
|
|
}
|
|
|
|
}
|