diff options
Diffstat (limited to 'commands/compose/send.go')
-rw-r--r-- | commands/compose/send.go | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go index d43f28ea..eeea96cd 100644 --- a/commands/compose/send.go +++ b/commands/compose/send.go @@ -109,12 +109,17 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error { log.Debugf("send config rcpts: %s", ctx.rcpts) log.Debugf("send config domain: %s", ctx.domain) - warn, err := composer.ShouldWarnAttachment() - if err != nil || warn { - msg := "You may have forgotten an attachment." - if err != nil { - log.Warnf("failed to check for a forgotten attachment: %v", err) - msg = "Failed to check for a forgotten attachment." + warnSubject := composer.ShouldWarnSubject() + warnAttachment := composer.ShouldWarnAttachment() + if warnSubject || warnAttachment { + var msg string + switch { + case warnSubject && warnAttachment: + msg = "The subject is empty, and you may have forgotten an attachment." + case warnSubject: + msg = "The subject is empty." + default: + msg = "You may have forgotten an attachment." } prompt := widgets.NewPrompt( |