aboutsummaryrefslogtreecommitdiff
path: root/config/config.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-11-10 11:00:21 -0500
committerDrew DeVault <sir@cmpwn.com>2019-11-10 11:00:21 -0500
commitcb7d7a043892e9911491c3acc32a36b61d891ea7 (patch)
treed38079aaad1e9048ce4118fcd8691652be2ed614 /config/config.go
parent3ba69edab5f0c787424dac9649e43a7743da13ca (diff)
Add some defaults for template options
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go
index f46af09..32d07fc 100644
--- a/config/config.go
+++ b/config/config.go
@@ -319,7 +319,9 @@ func (config *AercConfig) LoadConfig(file *ini.File) error {
return err
}
templateDirs := templatesSec.Key("template-dirs").String()
- config.Templates.TemplateDirs = strings.Split(templateDirs, ":")
+ if templateDirs != "" {
+ config.Templates.TemplateDirs = strings.Split(templateDirs, ":")
+ }
for key, val := range templatesSec.KeysHash() {
if key == "template-dirs" {
continue
@@ -404,6 +406,12 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) {
{"Subject"},
},
},
+
+ Templates: TemplateConfig{
+ TemplateDirs: []string{path.Join(sharedir, "templates")},
+ QuotedReply: "quoted_reply",
+ Forwards: "forward_as_body",
+ },
}
// These bindings are not configurable
config.Bindings.AccountWizard.ExKey = KeyStroke{