Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Nov 5, 2023
1 parent f277fed commit 9ad09aa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions push/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ func (h *Hub) Run(events <-chan Event, valueChan <-chan util.Param) {
log := util.NewLogger("push")

for ev := range events {
fmt.Println("event", ev)

if len(h.sender) == 0 {
continue
}
Expand All @@ -97,12 +99,12 @@ func (h *Hub) Run(events <-chan Event, valueChan <-chan util.Param) {
continue
}

for _, sender := range h.sender {
if strings.TrimSpace(msg) != "" {
if strings.TrimSpace(msg) != "" {
for _, sender := range h.sender {
go sender.Send(title, msg)
} else {
log.DEBUG.Printf("did not send empty message template for %s: %v", ev.Event, err)
}
} else {
log.DEBUG.Printf("did not send empty message template for %s: %v", ev.Event, err)
}
}
}

0 comments on commit 9ad09aa

Please sign in to comment.