Fix email sending for report notification confirmation

The links in the email don't work, but it's a first step
This commit is contained in:
Eli Ribble 2026-02-02 17:00:48 +00:00
parent 7ee2f72b8e
commit 00a75a556e
No known key found for this signature in database
9 changed files with 105 additions and 91 deletions

View file

@ -199,6 +199,7 @@ const (
CommsMessagetypeemailReportSubscriptionConfirmation CommsMessagetypeemail = "report-subscription-confirmation"
CommsMessagetypeemailReportStatusScheduled CommsMessagetypeemail = "report-status-scheduled"
CommsMessagetypeemailReportStatusComplete CommsMessagetypeemail = "report-status-complete"
CommsMessagetypeemailReportNotificationConfirmation CommsMessagetypeemail = "report-notification-confirmation"
)
func AllCommsMessagetypeemail() []CommsMessagetypeemail {
@ -207,6 +208,7 @@ func AllCommsMessagetypeemail() []CommsMessagetypeemail {
CommsMessagetypeemailReportSubscriptionConfirmation,
CommsMessagetypeemailReportStatusScheduled,
CommsMessagetypeemailReportStatusComplete,
CommsMessagetypeemailReportNotificationConfirmation,
}
}
@ -221,7 +223,8 @@ func (e CommsMessagetypeemail) Valid() bool {
case CommsMessagetypeemailInitialContact,
CommsMessagetypeemailReportSubscriptionConfirmation,
CommsMessagetypeemailReportStatusScheduled,
CommsMessagetypeemailReportStatusComplete:
CommsMessagetypeemailReportStatusComplete,
CommsMessagetypeemailReportNotificationConfirmation:
return true
default:
return false

View file

@ -0,0 +1,3 @@
-- +goose Up
ALTER TYPE comms.MessageTypeEmail ADD VALUE 'report-notification-confirmation' AFTER 'report-status-complete';
UPDATE comms.email_log SET source = 'report-notification-confirmation' WHERE source = 'report-subscription-confirmation';