aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/forward.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/forward.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/forward.go')
-rw-r--r--commands/msg/forward.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/msg/forward.go b/commands/msg/forward.go
index 4adfd128..78c24380 100644
--- a/commands/msg/forward.go
+++ b/commands/msg/forward.go
@@ -198,7 +198,7 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error {
continue
}
store.FetchBodyPart(msg.Uid, 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 {