Commit 310b4fcda5f17e997aeb2b3f39416a69ee59c3c0
1 parent
4b5d3a0d
Exists in
master
and in
1 other branch
Don't send comment notification to user who posted the comment
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
app/mailers/mailer.rb
@@ -31,7 +31,10 @@ class Mailer < ActionMailer::Base | @@ -31,7 +31,10 @@ class Mailer < ActionMailer::Base | ||
31 | @notice = @problem.notices.first | 31 | @notice = @problem.notices.first |
32 | @app = @problem.app | 32 | @app = @problem.app |
33 | 33 | ||
34 | - mail :to => @app.notification_recipients, | 34 | + # Don't send comment notification to user who posted the comment |
35 | + recipients = @app.notification_recipients - [comment.user.email] | ||
36 | + | ||
37 | + mail :to => recipients, | ||
35 | :subject => "#{@user.name} commented on [#{@app.name}][#{@notice.environment_name}] #{@notice.message.truncate(50)}" | 38 | :subject => "#{@user.name} commented on [#{@app.name}][#{@notice.environment_name}] #{@notice.message.truncate(50)}" |
36 | end | 39 | end |
37 | end | 40 | end |