From 92e8ace56fd0ce351e94345c1fd49fbb6b08fca1 Mon Sep 17 00:00:00 2001 From: Markus Thierolf <77847348+thierolm@users.noreply.github.com> Date: Sun, 27 Feb 2022 09:57:09 +0100 Subject: [PATCH] Skip sending empty msg after template rendering (#2720) --- push/hub.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/push/hub.go b/push/hub.go index 234da2f3cc..f90975424d 100644 --- a/push/hub.go +++ b/push/hub.go @@ -114,7 +114,11 @@ func (h *Hub) Run(events <-chan Event) { } for _, sender := range h.sender { - go sender.Send(title, msg) + if strings.TrimSpace(msg) != "" { + go sender.Send(title, msg) + } else { + log.DEBUG.Printf("did not send empty message template for %s: %v", ev.Event, err) + } } } }