compose: refactor attachment handling

Refactor the attachment handling process in the composer. The composer
can currently only handle attachments that are stored as files (or pgp
keys). This patch removes this limitation so that any message part can
be handled as an attachment. With this we can treat files, pgp keys and
message parts on an equal footing and it will enable us also to easily
forward attachments.

Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
Koni Marti 2022-06-28 23:42:07 +02:00 committed by Robin Jarry
parent ccd76e6494
commit 9d90b70b4e
3 changed files with 221 additions and 152 deletions
commands/compose

View file

@ -27,6 +27,5 @@ func (AttachKey) Execute(aerc *widgets.Aerc, args []string) error {
composer, _ := aerc.SelectedTab().(*widgets.Composer)
composer.SetAttachKey(!composer.AttachKey())
return nil
return composer.SetAttachKey(!composer.AttachKey())
}