diff options
Diffstat (limited to 'commands/msg')
-rw-r--r-- | commands/msg/forward.go | 6 | ||||
-rw-r--r-- | commands/msg/recall.go | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/commands/msg/forward.go b/commands/msg/forward.go index 78c24380..ccfaa086 100644 --- a/commands/msg/forward.go +++ b/commands/msg/forward.go @@ -205,8 +205,12 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error { name = fmt.Sprintf("%s_%s_%d", bs.MIMEType, bs.MIMESubType, rand.Uint64()) } mu.Lock() - composer.AddPartAttachment(name, mime, params, reader) + err := composer.AddPartAttachment(name, mime, params, reader) mu.Unlock() + if err != nil { + logging.Errorf(err.Error()) + aerc.PushError(err.Error()) + } }) } } diff --git a/commands/msg/recall.go b/commands/msg/recall.go index 866266f5..b5c92f21 100644 --- a/commands/msg/recall.go +++ b/commands/msg/recall.go @@ -211,8 +211,12 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error { name = fmt.Sprintf("%s_%s_%d", bs.MIMEType, bs.MIMESubType, rand.Uint64()) } mu.Lock() - composer.AddPartAttachment(name, mime, params, reader) + err := composer.AddPartAttachment(name, mime, params, reader) mu.Unlock() + if err != nil { + logging.Errorf(err.Error()) + aerc.PushError(err.Error()) + } }) } }) |