aboutsummaryrefslogtreecommitdiffstats
path: root/worker/mbox/worker.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2023-06-21 22:13:05 +0200
committerRobin Jarry <robin@jarry.cc>2023-06-22 10:55:25 +0200
commitdfaab1f1d73e557bbdbcc428f04f701c0c09c136 (patch)
tree84266f8b5930c29e1d6b92f29ca67aabab4aa154 /worker/mbox/worker.go
parent626d118a31d6cb36900e67b93d535434aea75cb3 (diff)
downloadaerc-dfaab1f1d73e557bbdbcc428f04f701c0c09c136.tar.gz
maildir: add folder-map
Add the folder-map functionality to the maildir backend. If the folder-map config option is specified, the folder-map worker middleware is used. Unroll the worker.PostMessageInfoError function for a streamlined WorkerInteractor interface. Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/mbox/worker.go')
-rw-r--r--worker/mbox/worker.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/worker/mbox/worker.go b/worker/mbox/worker.go
index 5034f66d..8ed04e05 100644
--- a/worker/mbox/worker.go
+++ b/worker/mbox/worker.go
@@ -162,8 +162,16 @@ func (w *mboxWorker) handleMessage(msg types.WorkerMessage) error {
}
msgInfo, err := messageInfo(m, true)
if err != nil {
- w.worker.PostMessageInfoError(msg, uid, err)
- break
+ w.worker.PostMessage(&types.MessageInfo{
+ Info: &models.MessageInfo{
+ Envelope: &models.Envelope{},
+ Flags: models.SeenFlag,
+ Uid: uid,
+ Error: err,
+ },
+ Message: types.RespondTo(msg),
+ }, nil)
+ continue
} else {
switch {
case len(w.headersExclude) > 0: