~sircmpwn/aerc

2559ebfac56a8060c8af001ba61709f3c4d78d04 — Leszek CimaƂa 5 months ago 4f28926
remove garbage headers in reply message

Very important fix. Remove garbage from reply message headers. Till
now all Original fields were send in reply, which we do not want and could
lead to uncorrect email message.
1 files changed, 2 insertions(+), 1 deletions(-)

M widgets/compose.go
M widgets/compose.go => widgets/compose.go +2 -1
@@ 469,7 469,8 @@ func (c *Composer) PrepareHeader() (*mail.Header, []string, error) {
	// Merge in additional headers
	txthdr := mhdr.Header
	for key, value := range c.defaults {
		if !txthdr.Has(key) && value != "" {
		// skip all Original* defaults, they contain info about original message
		if !txthdr.Has(key) && value != "" && !strings.HasPrefix(key, "Original") {
			mhdr.SetText(key, value)
		}
	}