lib/ahoy_email/processor.rb in ahoy_email-0.3.0 vs lib/ahoy_email/processor.rb in ahoy_email-0.3.1
- old
+ new
@@ -37,10 +37,10 @@
end
end
def track_send
safely do
- if (message_id = message["Ahoy-Message-Id"])
+ if (message_id = message["Ahoy-Message-Id"]) && message.perform_deliveries
ahoy_message = AhoyEmail.message_model.where(id: message_id.to_s).first
if ahoy_message
ahoy_message.sent_at = Time.now
ahoy_message.save
end