From cc3b753433c1b36e8cf8bedb8fa47fe14712e4fb Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Fri, 3 Jul 2026 15:43:55 +0530 Subject: [PATCH] appview/state: start email digest dispatcher Signed-off-by: Anirudh Oppiliappan --- appview/state/state.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appview/state/state.go b/appview/state/state.go index 63740022..73b662d4 100644 --- a/appview/state/state.go +++ b/appview/state/state.go @@ -28,6 +28,7 @@ import ( dbnotify "tangled.org/core/appview/notify/db" lognotify "tangled.org/core/appview/notify/logging" phnotify "tangled.org/core/appview/notify/posthog" + emaildispatch "tangled.org/core/appview/notify/email" whnotify "tangled.org/core/appview/notify/webhook" "tangled.org/core/appview/oauth" "tangled.org/core/appview/pages" @@ -202,6 +203,11 @@ func Make(ctx context.Context, config *config.Config) (*State, error) { go ingester.SweepPendingVerifications() go ingester.StartPendingStateReconciler() + if config.Resend.ApiKey != "" { + dispatcher := emaildispatch.NewDispatcher(d, config.Resend, config.Core.BaseUrl(), res, tlog.SubLogger(logger, "email-dispatcher"), config.Core.Dev) + go dispatcher.Start(ctx) + } + var cfClient *cloudflare.Client if config.Cloudflare.ApiToken != "" { cfClient, err = cloudflare.New(config) -- 2.51.2