msg/reply: fix address comparison

Compare self address in lowercase, to avoid self-replying when people
put in uppercase versions of the mail.

Reported-By: helby on Freenode
This commit is contained in:
Reto Brunner 2020-02-16 21:14:11 +01:00
parent 78dd043057
commit 37fc4d9423

View file

@ -95,7 +95,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
} }
for _, addr := range msg.Envelope.To { for _, addr := range msg.Envelope.To {
address := fmt.Sprintf("%s@%s", addr.Mailbox, addr.Host) address := fmt.Sprintf("%s@%s", addr.Mailbox, addr.Host)
if address == us.Address { if strings.ToLower(address) == strings.ToLower(us.Address) {
continue continue
} }
to = append(to, addr.Format()) to = append(to, addr.Format())