Don't prefix Re: if prefix already present

This commit is contained in:
Drew DeVault 2019-05-16 12:42:46 -04:00
parent e367469e1a
commit 7f97e0b605

View file

@ -74,7 +74,12 @@ func Reply(aerc *widgets.Aerc, args []string) error {
} }
} }
subject := "Re: " + msg.Envelope.Subject var subject string
if !strings.HasPrefix(msg.Envelope.Subject, "Re: ") {
subject = "Re: " + msg.Envelope.Subject
} else {
subject = msg.Envelope.Subject
}
composer := widgets.NewComposer( composer := widgets.NewComposer(
aerc.Config(), acct.AccountConfig(), acct.Worker()). aerc.Config(), acct.AccountConfig(), acct.Worker()).