aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/alert_changed.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mauve/alert_changed.rb')
-rw-r--r--lib/mauve/alert_changed.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/mauve/alert_changed.rb b/lib/mauve/alert_changed.rb
index a17c32f..ebcbbda 100644
--- a/lib/mauve/alert_changed.rb
+++ b/lib/mauve/alert_changed.rb
@@ -109,6 +109,7 @@ module Mauve
unless alert_group.notifications.nil?
alert_group.notifications.each do |notification|
+
#
# Build an array of people that could/should be notified.
#
@@ -128,7 +129,12 @@ module Mauve
#
notification_people.sort.uniq.each do |np|
if np == self.person
- Configuration.current.people[np].remind(alert, level)
+ #
+ # Only remind if the time is right.
+ #
+ if DuringRunner.new(Time.now, alert, &notification.during).now?
+ Configuration.current.people[np].remind(alert, level)
+ end
self.remind_at = notification.remind_at_next(alert)
save
saved = true