diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/msg/forward.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/msg/forward.go b/commands/msg/forward.go index cb2cab35..7c491a06 100644 --- a/commands/msg/forward.go +++ b/commands/msg/forward.go @@ -236,8 +236,8 @@ func (f forward) Execute(args []string) error { fetchBodyPart(p, func(reader io.Reader) { mime := bs.FullMIMEType() params := lib.SetUtf8Charset(bs.Params) - name, ok := params["name"] - if !ok { + name := bs.FileName() + if name == "" { name = fmt.Sprintf("%s_%s_%d", bs.MIMEType, bs.MIMESubType, rand.Uint64()) } mu.Lock() |