aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/account.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-07-17 14:31:20 +0200
committerRobin Jarry <robin@jarry.cc>2023-08-04 23:16:29 +0200
commitd5210acf092f3c3346c363dbe3ce5ca899fb5a24 (patch)
treeb84228cdb3ff6dbe914a4eae788fbaa9e93dca3e /widgets/account.go
parent24eab0f5ef6324b00717997f671cf1d13317bd5c (diff)
downloadaerc-d5210acf092f3c3346c363dbe3ce5ca899fb5a24.tar.gz
hooks: add account and folder to mail-received env
Add AERC_ACCOUNT and AERC_FOLDER to the environment of the mail-received hook command. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Tristan Partin <tristan@partin.io>
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/widgets/account.go b/widgets/account.go
index e9c86504..ecf357e9 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -241,6 +241,8 @@ func (acct *AccountView) newStore(name string) *lib.MessageStore {
uiConf.SortThreadSiblings,
func(msg *models.MessageInfo) {
err := hooks.RunHook(&hooks.MailReceived{
+ Account: acct.Name(),
+ Folder: name,
MsgInfo: msg,
})
if err != nil {