diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-05-05 12:53:14 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-05-06 11:02:43 +0200 |
commit | bb400c7d88a08bc29fd635486dffbbad10f1835d (patch) | |
tree | 05446eca11fdbaf9608957c93d9821a2425ca4f4 /config/config.go | |
parent | 5c5158b3c1275a11b66687496706372c01f66817 (diff) | |
download | aerc-bb400c7d88a08bc29fd635486dffbbad10f1835d.tar.gz |
pgp: add options auto-sign & opportunistic-encrypt
Add account level config options for auto-sign and opportunistic
encryption.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Koni Marti <koni.marti@gmail.com>
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go index 8480f10a..80f7f751 100644 --- a/config/config.go +++ b/config/config.go @@ -104,7 +104,11 @@ type AccountConfig struct { SignatureCmd string EnableFoldersSort bool `ini:"enable-folders-sort"` FoldersSort []string `ini:"folders-sort" delim:","` - PgpKeyId string `ini:"pgp-key-id"` + + // PGP Config + PgpKeyId string `ini:"pgp-key-id"` + PgpAutoSign bool `ini:"pgp-auto-sign"` + PgpOpportunisticEncrypt bool `ini:"pgp-opportunistic-encrypt"` } type BindingConfig struct { @@ -251,6 +255,10 @@ func loadAccountConfig(path string) ([]AccountConfig, error) { account.EnableFoldersSort, _ = strconv.ParseBool(val) } else if key == "pgp-key-id" { account.PgpKeyId = val + } else if key == "pgp-auto-sign" { + account.PgpAutoSign, _ = strconv.ParseBool(val) + } else if key == "pgp-opportunistic-encrypt" { + account.PgpOpportunisticEncrypt, _ = strconv.ParseBool(val) } else if key != "name" { account.Params[key] = val } |