aerc/worker/imap/movecopy.go

17 lines
397 B
Go
Raw Normal View History

2019-05-14 20:34:42 +00:00
package imap
import (
"git.sr.ht/~sircmpwn/aerc2/worker/types"
)
func (imapw *IMAPWorker) handleCopyMessages(msg *types.CopyMessages) {
if err := imapw.client.UidCopy(&msg.Uids, msg.Destination); err != nil {
imapw.worker.PostMessage(&types.Error{
Message: types.RespondTo(msg),
Error: err,
}, nil)
} else {
imapw.worker.PostMessage(&types.Done{types.RespondTo(msg)}, nil)
}
}