aboutsummaryrefslogtreecommitdiff
path: root/commands/msg/unsubscribe.go
diff options
context:
space:
mode:
authorSrivathsan Murali <sri@vathsan.com>2019-11-03 13:51:14 +0100
committerDrew DeVault <sir@cmpwn.com>2019-11-10 10:15:49 -0500
commit3ba69edab5f0c787424dac9649e43a7743da13ca (patch)
treebccbdd4e1844cc89f011839f0d6557012a14d1d0 /commands/msg/unsubscribe.go
parentad68a9e4e471eb708893ad16601ab14a4672a2da (diff)
Add Templates with Parsing
+ Changes NewComposer to return error. + Add lib to handle templates using "text/template". + Add -T option to following commands - compose. - reply - forward + Quoted replies using templates. + Forwards as body using templates + Default templates are installed similar to filters. + Templates Config in aerc.conf. - Required templates are parsed while loading config. + Add aerc-templates.7 manual for using template data.
Diffstat (limited to 'commands/msg/unsubscribe.go')
-rw-r--r--commands/msg/unsubscribe.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/msg/unsubscribe.go b/commands/msg/unsubscribe.go
index 15a9411..5ffec46 100644
--- a/commands/msg/unsubscribe.go
+++ b/commands/msg/unsubscribe.go
@@ -87,13 +87,17 @@ func unsubscribeMailto(aerc *widgets.Aerc, u *url.URL) error {
"To": u.Opaque,
"Subject": u.Query().Get("subject"),
}
- composer := widgets.NewComposer(
+ composer, err := widgets.NewComposer(
aerc,
aerc.Config(),
acct.AccountConfig(),
acct.Worker(),
+ "",
defaults,
)
+ if err != nil {
+ return err
+ }
composer.SetContents(strings.NewReader(u.Query().Get("body")))
tab := aerc.NewTab(composer, "unsubscribe")
composer.OnHeaderChange("Subject", func(subject string) {