diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-06-23 11:26:19 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-06-24 21:08:21 +0200 |
commit | 8f9bb2b289af34581b43e0777b2376ab0617aecd (patch) | |
tree | ad89fdf43896e34fec883d16bcae7bd61a8f1049 /widgets/msgviewer.go | |
parent | e9b01867827aac29f11b376debaf2209e8e7c9b4 (diff) | |
download | aerc-8f9bb2b289af34581b43e0777b2376ab0617aecd.tar.gz |
pgp: fix pipe|open|save command behavior
Signed and/or encrypted PGP messages did not behave properly for pipe,
open, and save commands. Specifically, the proper Message Part would not
be passed to the command in the MessageViewer. This is due to the
encapsulation of the body structure. This patch fixes the behavior for
piping|opening|saving of message parts.
Fixes: https://todo.sr.ht/~rjarry/aerc/47
Reported-by: ~ph14nix
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r-- | widgets/msgviewer.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index b41b57c0..0e6af5b5 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -290,6 +290,10 @@ func (mv *MessageViewer) SelectedAccount() *AccountView { return mv.acct } +func (mv *MessageViewer) MessageView() lib.MessageView { + return mv.msg +} + func (mv *MessageViewer) SelectedMessage() (*models.MessageInfo, error) { if mv.msg == nil { return nil, errors.New("no message selected") |