aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Houston <robin@lenny.robin>2011-09-07 22:23:41 +0100
committerRobin Houston <robin@lenny.robin>2011-09-07 22:23:41 +0100
commit7a918301c06527c07175d99c3a5fd390e7d5f55f (patch)
treec7b24d44714c1d7886f4a19566cadff86c23d7fb
parent399cc7f589e166962d0e97a1a0b7a706a842416f (diff)
Don’t send track messages to bounced users
Check the User.should_be_emailed? value before sending track alert messages to a user.
-rw-r--r--app/models/track_mailer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/track_mailer.rb b/app/models/track_mailer.rb
index 92bf93898..5e1c31974 100644
--- a/app/models/track_mailer.rb
+++ b/app/models/track_mailer.rb
@@ -46,6 +46,8 @@ class TrackMailer < ApplicationMailer
return false
end
for user in users
+ next if !user.should_be_emailed?
+
email_about_things = []
track_things = TrackThing.find(:all, :conditions => [ "tracking_user_id = ? and track_medium = ?", user.id, 'email_daily' ])
for track_thing in track_things