aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-17 11:05:21 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-17 11:05:21 -0400
commit23650ac0c7173fcecfc727f1f4db52aeb168a3b9 (patch)
tree9c1c340ff93ff9d903a5f43a9d4bef38dbb9bd62 /widgets/compose.go
parente436780b4746fc7eb2dbbd804e4d7dc5cf5fef63 (diff)
downloadaerc-23650ac0c7173fcecfc727f1f4db52aeb168a3b9.tar.gz
Fix date header on outgoing emails
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 18fe38ce..31c0a2d7 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -221,7 +221,7 @@ func (c *Composer) PrepareHeader() (*mail.Header, []string, error) {
if subject, _ := header.Subject(); subject == "" {
header.SetSubject(c.headers.subject.input.String())
}
- if date, err := header.Date(); err != nil && date != (time.Time{}) {
+ if date, err := header.Date(); err != nil || date == (time.Time{}) {
header.SetDate(time.Now())
}
if from, _ := mhdr.Text("From"); from == "" {