diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-08-22 11:23:23 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-08-22 11:23:23 +0100 |
commit | 829a9af526cecaa53c8810ceb83af26a4f30f238 (patch) | |
tree | 6b5493ebbbf746a23944d80aac9360c6412e4963 /app/models | |
parent | 744548b8943f38e56a8021fa16c3c00ef11c1356 (diff) |
Don't send comment alerts for external requests.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/request_mailer.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb index 03d26f237..ba9285fc6 100644 --- a/app/models/request_mailer.rb +++ b/app/models/request_mailer.rb @@ -28,17 +28,17 @@ class RequestMailer < ApplicationMailer :filename => attachment_name end end - + # Used when a response is uploaded using the API def external_response(info_request, body, sent_at, attachments) @from = blackhole_email @recipients = info_request.incoming_name_and_email @body = { :body => body } - + # ActionMailer only works properly when the time is in the local timezone: # see https://rails.lighthouseapp.com/projects/8994/tickets/3113-actionmailer-only-works-correctly-with-sent_on-times-that-are-in-the-local-time-zone @sent_on = sent_at.dup.localtime - + attachments.each do |attachment_hash| attachment attachment_hash end @@ -392,6 +392,7 @@ class RequestMailer < ApplicationMailer ) for info_request in info_requests + next if info_request.is_external? # Count number of new comments to alert on earliest_unalerted_comment_event = nil last_comment_event = nil |