diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-04-17 21:26:49 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-04-17 21:26:49 +0100 |
commit | 4c99233f3b3112cd2be5ab6fd5d6e7c1c344406b (patch) | |
tree | ca5a7c3659b5aa3be4ecf40af95ef24870c09e7c /lib/mauve/notifier.rb | |
parent | 3a579efcd3ea7e4362f7abeb4138c4087e6f13c1 (diff) |
* The notification buffer is now used to store Alerts/AlertChangeds and times
to notify about, rather than notifications to be sent.
* Fixed up the debug notifier a bit more.
* Using the debug notifier extras more now.
Diffstat (limited to 'lib/mauve/notifier.rb')
-rw-r--r-- | lib/mauve/notifier.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/mauve/notifier.rb b/lib/mauve/notifier.rb index bf36162..8a26b2c 100644 --- a/lib/mauve/notifier.rb +++ b/lib/mauve/notifier.rb @@ -86,14 +86,12 @@ module Mauve # Empty the buffer, one notification at a time. # sz.times do - person, *args = Server.notification_pop - - # - # Nil person.. that's craaazy too! - # - next if person.nil? - - person.send_alert(*args) + alert, at = Server.notification_pop + if alert.alert_group.nil? + logger.warn "Could not notify for #{alert} since there are no matching alert groups" + else + alert.alert_group.notify(alert, at) + end end end |