aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/alert.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-17 11:08:07 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-17 11:08:07 +0100
commit8c8e5ae926e0009743fe92dccb588783640a6022 (patch)
treee23eea583beac0caf5fb3e45a33b4d2ac7796abf /lib/mauve/alert.rb
parent79dcf16ec6d229d6c31e055ed8e6a98327526a3a (diff)
* Reminder notifications now take the same path to notify as initial alerts
* Threading tidied -- processor will not do anything unless the timer has frozen * Person#send_alert now tidied and merged with alert_changed * POP3 server only shows alerts relevant to the user * Server now defaults to using an in-memory SQLite database (good for testing) * Server initializes a blank mauve config. * Tests tidied up
Diffstat (limited to 'lib/mauve/alert.rb')
-rw-r--r--lib/mauve/alert.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb
index 07421d5..28dfcf1 100644
--- a/lib/mauve/alert.rb
+++ b/lib/mauve/alert.rb
@@ -235,7 +235,11 @@ module Mauve
public
def notify
- self.alert_group.notify(self)
+ if self.alert_group.nil?
+ logger.warn "Could not notify for #{self} since there are no matching alert groups"
+ else
+ self.alert_group.notify(self)
+ end
end
def acknowledge!(person, ack_until = Time.now+3600)
@@ -531,7 +535,8 @@ module Mauve
alert_db.clear!
end
end
-
+
+ return nil
end
def logger