aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
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)