Skip to content

Commit

Permalink
Skip sending empty msg after template rendering (evcc-io#2720)
Browse files Browse the repository at this point in the history
  • Loading branch information
thierolm authored Feb 27, 2022
1 parent 45a5bdf commit 92e8ace
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion push/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
}

0 comments on commit 92e8ace

Please sign in to comment.