mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Added the mapping between notification and reply to email to the database and persisted the mapping when the request is received by the end point. the end point also checks if the reply to email id exists and if not returns an error. Also added tests to test the functionality.
This commit is contained in:
@@ -19,7 +19,7 @@ from app.notifications.process_notifications import (
|
||||
persist_notification,
|
||||
send_notification_to_queue,
|
||||
simulated_recipient,
|
||||
persist_scheduled_notification)
|
||||
persist_scheduled_notification, persist_email_reply_to_id_for_notification)
|
||||
from app.notifications.process_letter_notifications import (
|
||||
create_letter_notification
|
||||
)
|
||||
@@ -140,6 +140,10 @@ def process_sms_or_email_notification(*, form, notification_type, api_key, templ
|
||||
simulated=simulated
|
||||
)
|
||||
|
||||
email_reply_to_id = form.get("email_reply_to_id", None)
|
||||
if email_reply_to_id is not None:
|
||||
persist_email_reply_to_id_for_notification(notification.id, email_reply_to_id)
|
||||
|
||||
scheduled_for = form.get("scheduled_for", None)
|
||||
if scheduled_for:
|
||||
persist_scheduled_notification(notification.id, form["scheduled_for"])
|
||||
|
||||
Reference in New Issue
Block a user