aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-01-19 21:28:06 +0100
committerRobin Jarry <robin@jarry.cc>2022-01-19 21:42:41 +0100
commit877a94f5d9a7852af5fbcfd1196a4b1f4c676564 (patch)
tree798e640ec50520cdd040570ecf1f16fb911a1e2f /commands
parent92bf89c3389b8e08cf99d30cf20a818529680f51 (diff)
downloadaerc-877a94f5d9a7852af5fbcfd1196a4b1f4c676564.tar.gz
compose: add default template for new messages
Allow defining a default template to use when composing new messages. Add an example to be used for new users. Signed-off-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands')
-rw-r--r--commands/account/compose.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/account/compose.go b/commands/account/compose.go
index 62bf11d3..d4128db6 100644
--- a/commands/account/compose.go
+++ b/commands/account/compose.go
@@ -30,6 +30,9 @@ func (Compose) Execute(aerc *widgets.Aerc, args []string) error {
return err
}
acct := aerc.SelectedAccount()
+ if template == "" {
+ template = aerc.Config().Templates.NewMessage
+ }
composer, err := widgets.NewComposer(aerc, acct,
aerc.Config(), acct.AccountConfig(), acct.Worker(),