Commit becbf039bacd87644a6fb0245871325a53771fe0
1 parent
1394b79f
Exists in
master
and in
1 other branch
added interval statement for notifications
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/models/notice_observer.rb
... | ... | @@ -3,11 +3,11 @@ class NoticeObserver < Mongoid::Observer |
3 | 3 | |
4 | 4 | def after_create notice |
5 | 5 | # if the app has a notification service, fire it off |
6 | - if notice.app.notification_service_configured? | |
6 | + if notice.app.notification_service_configured? and notice.should_notify? | |
7 | 7 | notice.app.notification_service.create_notification(notice.problem) |
8 | 8 | end |
9 | 9 | |
10 | - Mailer.err_notification(notice).deliver if notice.should_notify? | |
10 | + Mailer.err_notification(notice).deliver if notice.should_email? | |
11 | 11 | end |
12 | 12 | |
13 | 13 | end | ... | ... |