diff --git a/queue_services/account-mailer/src/account_mailer/resources/worker.py b/queue_services/account-mailer/src/account_mailer/resources/worker.py index dc155154e8..3294856c64 100644 --- a/queue_services/account-mailer/src/account_mailer/resources/worker.py +++ b/queue_services/account-mailer/src/account_mailer/resources/worker.py @@ -129,10 +129,12 @@ def handle_nsf_lock_unlock_account(message_type, email_msg): current_app.logger.debug('Lock account message received') template_name = TemplateType.NSF_LOCK_ACCOUNT_TEMPLATE_NAME.value org_id = email_msg.get('accountId') - admin_coordinator_emails = get_member_emails(org_id, (ADMIN, COORDINATOR)) + emails = get_member_emails(org_id, (ADMIN, COORDINATOR)) + if additional_emails := email_msg.get('additionalEmails'): + emails += ',' + additional_emails subject = SubjectType.NSF_LOCK_ACCOUNT_SUBJECT.value logo_url = email_msg.get('logo_url') - email_dict = common_mailer.process(org_id, admin_coordinator_emails, template_name, + email_dict = common_mailer.process(org_id, emails, template_name, subject, logo_url=logo_url) process_email(email_dict) elif message_type == QueueMessageTypes.NSF_UNLOCK_ACCOUNT.value: diff --git a/queue_services/auth-queue/src/auth_queue/resources/worker.py b/queue_services/auth-queue/src/auth_queue/resources/worker.py index b94329c7ab..648f2f115f 100644 --- a/queue_services/auth-queue/src/auth_queue/resources/worker.py +++ b/queue_services/auth-queue/src/auth_queue/resources/worker.py @@ -116,6 +116,7 @@ def process_pay_lock_unlock_event(event_message: SimpleCloudEvent): org.status_code = OrgStatus.NSF_SUSPENDED.value org.suspended_on = datetime.now() org.suspension_reason_code = queue_data.get('suspensionReasonCode', None) + data['additionalEmails'] = queue_data.get('additionalEmails', None) if skip_notification is False: publish_to_mailer(QueueMessageTypes.NSF_LOCK_ACCOUNT.value, data, QueueSources.AUTH_QUEUE.value) elif message_type == QueueMessageTypes.NSF_UNLOCK_ACCOUNT.value: