aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorLeszek CimaƂa <ernierasta@zori.cz>2020-01-08 21:44:14 +0100
committerDrew DeVault <sir@cmpwn.com>2020-01-09 14:31:19 -0500
commitbf28e23933a9808820ef4855257accf4634068e9 (patch)
treed09d522d0f48d6f3e1013f5f7197e64636e51e99 /widgets
parentda6fb1a1551767609e1d5a97631bdaffdc301f4c (diff)
create OriginalMail struct
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go3
-rw-r--r--widgets/compose.go5
2 files changed, 5 insertions, 3 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index da3f56f..a0e356a 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -14,6 +14,7 @@ import (
"git.sr.ht/~sircmpwn/aerc/config"
"git.sr.ht/~sircmpwn/aerc/lib"
"git.sr.ht/~sircmpwn/aerc/lib/ui"
+ "git.sr.ht/~sircmpwn/aerc/models"
)
type Aerc struct {
@@ -432,7 +433,7 @@ func (aerc *Aerc) Mailto(addr *url.URL) error {
}
}
composer, err := NewComposer(aerc, aerc.Config(),
- acct.AccountConfig(), acct.Worker(), "", defaults)
+ acct.AccountConfig(), acct.Worker(), "", defaults, models.OriginalMail{})
if err != nil {
return nil
}
diff --git a/widgets/compose.go b/widgets/compose.go
index 091eb70..636dcd1 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -26,6 +26,7 @@ import (
"git.sr.ht/~sircmpwn/aerc/config"
"git.sr.ht/~sircmpwn/aerc/lib/templates"
"git.sr.ht/~sircmpwn/aerc/lib/ui"
+ "git.sr.ht/~sircmpwn/aerc/models"
"git.sr.ht/~sircmpwn/aerc/worker/types"
)
@@ -59,7 +60,7 @@ type Composer struct {
func NewComposer(aerc *Aerc, conf *config.AercConfig,
acct *config.AccountConfig, worker *types.Worker, template string,
- defaults map[string]string) (*Composer, error) {
+ defaults map[string]string, original models.OriginalMail) (*Composer, error) {
if defaults == nil {
defaults = make(map[string]string)
@@ -68,7 +69,7 @@ func NewComposer(aerc *Aerc, conf *config.AercConfig,
defaults["From"] = acct.From
}
- templateData := templates.ParseTemplateData(defaults)
+ templateData := templates.ParseTemplateData(defaults, original)
cmpl := completer.New(conf.Compose.AddressBookCmd, func(err error) {
aerc.PushError(fmt.Sprintf("could not complete header: %v", err))
worker.Logger.Printf("could not complete header: %v", err)