Skip to content

Commit

Permalink
Merge pull request #41 from hazcod/fix/emptymsg
Browse files Browse the repository at this point in the history
fix: don't send empty messages
  • Loading branch information
hazcod authored Jan 5, 2022
2 parents 0c4ca62 + f42da42 commit 4d9f406
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ func main() {

userWS1Msg := ws1Messages[userEmail]

if len(userFalconMsg.Devices) == 0 && len(userWS1Msg.Devices) == 0 {
numFindings := 0
for _, device := range userWS1Msg.Devices {
numFindings += len(device.Findings)
}

if len(userFalconMsg.Devices) == 0 && numFindings == 0 {
continue
}

Expand Down

0 comments on commit 4d9f406

Please sign in to comment.