diff options
author | Bence Ferdinandy <bence@ferdinandy.com> | 2024-04-10 20:08:00 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-04-14 11:50:39 +0200 |
commit | cee5d5a3f602e5db0ca3feb6e0754c1bb0059f36 (patch) | |
tree | c380b0cb317a62d17b6ff4922fbc6c95486f3295 /app/account.go | |
parent | ae3f7419ce1b6d4a81c4f240ff1073ba45f45b52 (diff) | |
download | aerc-cee5d5a3f602e5db0ca3feb6e0754c1bb0059f36.tar.gz |
hooks: add tag-modified
Add the tag-modified hook for notmuch and JMAP accounts.
References: https://todo.sr.ht/~rjarry/aerc/136
Changelog-added: New `tag-modified` hook for notmuch and JMAP accounts.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app/account.go')
-rw-r--r-- | app/account.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/account.go b/app/account.go index 08ab6498..99739f01 100644 --- a/app/account.go +++ b/app/account.go @@ -282,6 +282,16 @@ func (acct *AccountView) newStore(name string) *lib.MessageStore { msg := fmt.Sprintf("mail-added hook: %s", err) PushError(msg) } + }, func(add []string, remove []string) { + err := hooks.RunHook(&hooks.TagModified{ + Account: acct.Name(), + Add: add, + Remove: remove, + }) + if err != nil { + msg := fmt.Sprintf("tag-modified hook: %s", err) + PushError(msg) + } }, acct.updateSplitView, acct.dirlist.UiConfig(name).ThreadContext, |