diff options
author | Robin Jarry <robin@jarry.cc> | 2022-10-12 23:52:45 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-10-16 11:35:24 +0200 |
commit | 9bd2e0c84fef66007bcab027883c01414b99b77c (patch) | |
tree | 515414d5d8d95f2360bd1e9db31ef7fdca7cdd86 /commands/msg/forward.go | |
parent | a4b80bcc8b4427016bfb0c2924ffaa9f8b90916d (diff) | |
download | aerc-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.go | 2 |
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 { |