From ea339eae1841ef78aee80637d99daa0f551b3fa0 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Wed, 29 Apr 2026 00:57:59 -0700 Subject: [PATCH] fix(cache): strip angle brackets in normalizeContactEmail Resolves #1122. Email addresses arriving from `From:` headers commonly come wrapped in angle brackets (``). The previous trim cutset was `","`, so the cache stored the literal `` and never matched future lookups against `foo@bar.com`. Add `<` and `>` to the trim cutset so the cache key is the bare address regardless of whether the input came from a header or a UI field. Whitespace and commas continue to be trimmed. --- config/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cache.go b/config/cache.go index 90feffe..e3677f7 100644 --- a/config/cache.go +++ b/config/cache.go @@ -149,7 +149,7 @@ func LoadContactsCache() (*ContactsCache, error) { } func normalizeContactEmail(email string) string { - return strings.ToLower(strings.Trim(strings.TrimSpace(email), ",")) + return strings.ToLower(strings.Trim(strings.TrimSpace(email), ",<>")) } // AddContact adds or updates a contact in the cache.