From cee5d5a3f602e5db0ca3feb6e0754c1bb0059f36 Mon Sep 17 00:00:00 2001 From: Bence Ferdinandy Date: Wed, 10 Apr 2024 20:08:00 +0200 Subject: 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 Acked-by: Robin Jarry --- app/account.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app') 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, -- cgit