aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorLeszek CimaƂa <ernierasta@zori.cz>2019-12-08 19:49:41 +0100
committerDrew DeVault <sir@cmpwn.com>2019-12-08 14:40:36 -0500
commit2559ebfac56a8060c8af001ba61709f3c4d78d04 (patch)
tree8c5df7c786840b5b0a9a8b40e7d22d9edff090e1 /widgets
parent4f2892695e1fdf89274bff434474b5d95e25ef5e (diff)
downloadaerc-2559ebfac56a8060c8af001ba61709f3c4d78d04.tar.gz
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.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/compose.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 24af18cb..c6c8015a 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -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)
}
}