Skip to content

Commit

Permalink
feat(manager): don't apply rules on Done notifications (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
nobe4 authored Jun 18, 2024
1 parent 372f2d3 commit 6b03b2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ func (m *Manager) Apply(noop bool) error {
slog.Debug("apply rule", "name", rule.Name, "count", len(selectedIds))

for _, notification := range m.Notifications.FilterFromIds(selectedIds) {
if notification.Meta.Done {
continue
}

if noop {
fmt.Printf("NOOP'ing action %s on notification %s\n", rule.Action, notification.String())
continue
Expand Down

0 comments on commit 6b03b2f

Please sign in to comment.