aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/pipe.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg/pipe.go')
-rw-r--r--commands/msg/pipe.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go
index 2faa5de1..001577c1 100644
--- a/commands/msg/pipe.go
+++ b/commands/msg/pipe.go
@@ -1,13 +1,10 @@
package msg
import (
- "encoding/base64"
"errors"
"fmt"
"io"
- "mime/quotedprintable"
"os/exec"
- "strings"
"time"
"git.sr.ht/~sircmpwn/aerc/commands"
@@ -129,14 +126,7 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error {
})
} else if pipePart {
p := provider.SelectedMessagePart()
- p.Store.FetchBodyPart(p.Msg.Uid, p.Index, func(reader io.Reader) {
- // email parts are encoded as 7bit (plaintext), quoted-printable, or base64
- if strings.EqualFold(p.Part.Encoding, "base64") {
- reader = base64.NewDecoder(base64.StdEncoding, reader)
- } else if strings.EqualFold(p.Part.Encoding, "quoted-printable") {
- reader = quotedprintable.NewReader(reader)
- }
-
+ p.Store.FetchBodyPart(p.Msg.Uid, p.Msg.BodyStructure, p.Index, func(reader io.Reader) {
if background {
doExec(reader)
} else {