mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 06:52:06 -05:00
Update send_to_providers and create_dvla_file_contents_for_notifications to use notification.reply_to_text.
The next thing to do is to stop updating the notification to sender mapping tables.
This commit is contained in:
@@ -402,7 +402,7 @@ def create_dvla_file_contents_for_notifications(notifications):
|
||||
notification.template.__dict__,
|
||||
notification.personalisation,
|
||||
notification_reference=notification.reference,
|
||||
contact_block=notification.service.get_default_letter_contact(),
|
||||
contact_block=notification.reply_to_text,
|
||||
org_id=notification.service.dvla_organisation.id,
|
||||
))
|
||||
for notification in notifications
|
||||
|
||||
@@ -70,15 +70,11 @@ def send_sms_to_provider(notification):
|
||||
raise
|
||||
else:
|
||||
try:
|
||||
sms_sender = dao_get_notification_sms_sender_mapping(notification.id)
|
||||
if not sms_sender:
|
||||
sms_sender = service.get_default_sms_sender()
|
||||
|
||||
provider.send_sms(
|
||||
to=validate_and_format_phone_number(notification.to, international=notification.international),
|
||||
content=str(template),
|
||||
reference=str(notification.id),
|
||||
sender=sms_sender
|
||||
sender=notification.reply_to_text
|
||||
)
|
||||
except Exception as e:
|
||||
dao_toggle_sms_provider(provider.name)
|
||||
@@ -129,10 +125,7 @@ def send_email_to_provider(notification):
|
||||
from_address = '"{}" <{}@{}>'.format(service.name, service.email_from,
|
||||
current_app.config['NOTIFY_EMAIL_DOMAIN'])
|
||||
|
||||
email_reply_to = dao_get_notification_email_reply_for_notification(notification.id)
|
||||
|
||||
if not email_reply_to:
|
||||
email_reply_to = service.get_default_reply_to_email_address()
|
||||
email_reply_to = notification.reply_to_text
|
||||
|
||||
reference = provider.send_email(
|
||||
from_address,
|
||||
|
||||
Reference in New Issue
Block a user