Files
aerc-fork-mirror/lib
Robin Jarry c8aa9da956 worker: add explicit directory to action messages
Previously, worker action messages did not specify which directory they
targeted. Workers implicitly assumed operations applied to the currently
selected folder. This assumption breaks when the UI needs to perform
operations on a folder different from the one currently open, such as
when fetching messages from a background account or handling move/copy
operations across folders.

Add Directory field to FetchDirectoryContents, FetchDirectoryThreaded,
SearchDirectory, FetchMessageHeaders, FetchFullMessages,
FetchMessageBodyPart, FetchMessageFlags, DeleteMessages, FlagMessages,
AnsweredMessages, and ForwardedMessages. Add Source field to
CopyMessages and MoveMessages to specify the origin folder.

The message store now populates these fields with its directory name.
Each worker backend validates the directory and switches context when
necessary. For IMAP, this means issuing a SELECT command when the
requested directory differs from the currently selected mailbox.

Update the foldermapper middleware to translate the new Directory and
Source fields between external and internal folder names in both
ProcessAction and PostMessage.

In the maildir backend, pass the resolved directory to search and
msgInfoFromUid instead of relying on the selected folder state. This
ensures FetchMessageHeaders and SearchDirectory operate on the correct
directory when it differs from the currently selected one.

Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Simon Martin <simon@nasilyan.com>
2026-02-09 14:46:27 +01:00
..
2026-02-09 14:46:27 +01:00
2025-01-21 13:39:01 +01:00
2025-12-20 18:06:30 +01:00
2025-12-20 18:06:30 +01:00
2025-12-20 18:06:30 +01:00
2025-12-20 18:06:30 +01:00
2025-12-20 18:06:30 +01:00
2025-12-20 18:06:30 +01:00
2019-07-26 14:29:34 -04:00
2025-12-20 18:06:30 +01:00
2025-12-20 18:06:30 +01:00
2025-12-20 18:06:30 +01:00