diff options
Diffstat (limited to 'lib/mauve/alert_changed.rb')
-rw-r--r-- | lib/mauve/alert_changed.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/mauve/alert_changed.rb b/lib/mauve/alert_changed.rb index 6f1a717..64aee7b 100644 --- a/lib/mauve/alert_changed.rb +++ b/lib/mauve/alert_changed.rb @@ -99,9 +99,19 @@ module Mauve end # - # Push this notifitcation onto the queue. + # Bail out if notifications for this alert have been suppressed. # - Server.notification_push([alert, Time.now]) + if alert.suppressed? + # + # Skip reminders if the alert is suppressed. + # + logger.info("Notifications suppressed until #{alert.suppressed_until} for #{alert.inspect}") + else + # + # Push this notifitcation onto the queue. + # + Server.notification_push([alert, Time.now]) + end # # Need to make sure this reminder is cleared. |