Skip to content

Commit

Permalink
fix: avoid sending events multiple times per run
Browse files Browse the repository at this point in the history
If multiple artists matched an event it was possible that we would
notify twice. Breaking early should prevent this.
  • Loading branch information
RyanConnell committed Dec 31, 2023
1 parent 89610ec commit a088919
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/watcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func (w *Watcher) FindEvents(diffMode bool) ([]*ticketmaster.Event, error) {
if w.trackedArtists.Contains(artist.Name) {
matchingEvents = append(matchingEvents, event)
matchingEventIDs = append(matchingEventIDs, event.ID)
break
}
}
}
Expand Down

0 comments on commit a088919

Please sign in to comment.