aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/recall.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-10-12 23:52:45 +0200
committerRobin Jarry <robin@jarry.cc>2022-10-16 11:35:24 +0200
commit9bd2e0c84fef66007bcab027883c01414b99b77c (patch)
tree515414d5d8d95f2360bd1e9db31ef7fdca7cdd86 /commands/msg/recall.go
parenta4b80bcc8b4427016bfb0c2924ffaa9f8b90916d (diff)
downloadaerc-9bd2e0c84fef66007bcab027883c01414b99b77c.tar.gz
msgpart: factorize mime type and filename construction
Reduce code duplication. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'commands/msg/recall.go')
-rw-r--r--commands/msg/recall.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/msg/recall.go b/commands/msg/recall.go
index c5585b05..866266f5 100644
--- a/commands/msg/recall.go
+++ b/commands/msg/recall.go
@@ -204,7 +204,7 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error {
continue
}
msg.FetchBodyPart(p, func(reader io.Reader) {
- mime := fmt.Sprintf("%s/%s", bs.MIMEType, bs.MIMESubType)
+ mime := bs.FullMIMEType()
params := lib.SetUtf8Charset(bs.Params)
name, ok := params["name"]
if !ok {