From fc9b6ae5bca5d0d09601beb1070cc24e22e0fb6d Mon Sep 17 00:00:00 2001 From: Duncan <52967253+dunkOnIT@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:34:09 +0200 Subject: [PATCH] Send emails to organizer and attendee upon registration (#10296) * added mailer job but untested * fixed new registration emails --- lib/registrations/lanes/competing.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/registrations/lanes/competing.rb b/lib/registrations/lanes/competing.rb index 4577add97e..1aa31e5685 100644 --- a/lib/registrations/lanes/competing.rb +++ b/lib/registrations/lanes/competing.rb @@ -16,6 +16,8 @@ def self.process!(lane_params, user_id, competition_id) changes = registration.changes.transform_values { |change| change[1] } changes[:event_ids] = lane_params[:competing][:event_ids] registration.save! + RegistrationsMailer.notify_organizers_of_new_registration(registration).deliver_later + RegistrationsMailer.notify_registrant_of_new_registration(registration).deliver_later registration.add_history_entry(changes, "worker", user_id, "Worker processed") end