From cbd798dfd5326e06f7f4d8adf1aa3d3d5bb70aa8 Mon Sep 17 00:00:00 2001 From: Thomas Cravey Date: Sat, 16 Aug 2025 20:59:23 -0500 Subject: [PATCH] fix(trigger): only send notifier when push=1/true; otherwise just return summary --- internal/httpapi/server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/httpapi/server.go b/internal/httpapi/server.go index e908d91..da279a1 100644 --- a/internal/httpapi/server.go +++ b/internal/httpapi/server.go @@ -155,7 +155,9 @@ func (s *Server) handleTrigger(w http.ResponseWriter, r *http.Request) { _, _ = w.Write([]byte("summarizer error")) return } - if s.Notifier != nil { + // Only push if explicitly requested + pushFlag := strings.EqualFold(r.URL.Query().Get("push"), "1") || strings.EqualFold(r.URL.Query().Get("push"), "true") + if pushFlag && s.Notifier != nil { title := fmt.Sprintf("IRC digest %s (%s)", channel, window) _ = s.Notifier.Notify(ctx, title, summary) if s.Metrics != nil {