1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2026-02-17 11:28:16 +01:00
aerc/worker/maildir
Robin Jarry f32246250e maildir: centralize error and response handling
Have individual message handlers return errors to the central
handleAction switch instead of posting Done or Error messages
themselves. The switch now dispatches the appropriate response based
on the return value: Done for nil, Error for regular errors,
Unsupported or Cancelled for the respective sentinel errors.

Add support for types.ErrNoop to signal that an operation had no
effect and should not produce a Done response. Replace the local
errUnsupported variable with the standard types.ErrUnsupported
sentinel.

In flag and mark handlers (handleAnsweredMessages,
handleForwardedMessages, handleFlagMessages), return immediately on
error instead of continuing the loop. This lets the central handler
report the error consistently.

Remove the currentSortCriteria field since it is no longer used.

Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Simon Martin <simon@nasilyan.com>
2026-02-09 14:46:27 +01:00
..
container.go maildir: fix filename encoded UID removal when moving messages 2025-06-05 12:44:08 +02:00
message.go worker: add directory and filter metadata to response messages 2026-02-09 14:46:27 +01:00
search.go worker: add explicit directory to action messages 2026-02-09 14:46:27 +01:00
worker.go maildir: centralize error and response handling 2026-02-09 14:46:27 +01:00