aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/compose.go
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/compose.go
parentda6fb1a1551767609e1d5a97631bdaffdc301f4c (diff)
downloadaerc-bf28e23933a9808820ef4855257accf4634068e9.tar.gz
create OriginalMail struct
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 091eb707..636dcd10 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)