aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/forward.go11
-rw-r--r--commands/msg/reply.go11
2 files changed, 10 insertions, 12 deletions
diff --git a/commands/msg/forward.go b/commands/msg/forward.go
index 0c6b0e05..b17482f9 100644
--- a/commands/msg/forward.go
+++ b/commands/msg/forward.go
@@ -74,14 +74,13 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error {
"To": to,
"Subject": subject,
}
- original := models.OriginalMail{}
+ original := models.OriginalMail{
+ From: format.FormatAddresses(msg.Envelope.From),
+ Date: msg.Envelope.Date,
+ RFC822Headers: msg.RFC822Headers,
+ }
addTab := func() (*widgets.Composer, error) {
- if template != "" {
- original.From = format.FormatAddresses(msg.Envelope.From)
- original.Date = msg.Envelope.Date
- }
-
composer, err := widgets.NewComposer(aerc, acct, aerc.Config(), acct.AccountConfig(),
acct.Worker(), template, defaults, original)
if err != nil {
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 85039793..0298ac20 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -152,14 +152,13 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
"Subject": subject,
"In-Reply-To": msg.Envelope.MessageId,
}
- original := models.OriginalMail{}
+ original := models.OriginalMail{
+ From: format.FormatAddresses(msg.Envelope.From),
+ Date: msg.Envelope.Date,
+ RFC822Headers: msg.RFC822Headers,
+ }
addTab := func() error {
- if template != "" {
- original.From = format.FormatAddresses(msg.Envelope.From)
- original.Date = msg.Envelope.Date
- }
-
composer, err := widgets.NewComposer(aerc, acct, aerc.Config(),
acct.AccountConfig(), acct.Worker(), template, defaults, original)
if err != nil {