diff --git a/coderd/database/queries.sql.go b/coderd/database/queries.sql.go index 89822a72a7855..785ba644e9688 100644 --- a/coderd/database/queries.sql.go +++ b/coderd/database/queries.sql.go @@ -3499,6 +3499,7 @@ func (q *sqlQuerier) EnqueueNotificationMessage(ctx context.Context, arg Enqueue const fetchNewMessageMetadata = `-- name: FetchNewMessageMetadata :one SELECT nt.name AS notification_name, + nt.id AS notification_template_id, nt.actions AS actions, nt.method AS custom_method, u.id AS user_id, @@ -3517,13 +3518,14 @@ type FetchNewMessageMetadataParams struct { } type FetchNewMessageMetadataRow struct { - NotificationName string `db:"notification_name" json:"notification_name"` - Actions []byte `db:"actions" json:"actions"` - CustomMethod NullNotificationMethod `db:"custom_method" json:"custom_method"` - UserID uuid.UUID `db:"user_id" json:"user_id"` - UserEmail string `db:"user_email" json:"user_email"` - UserName string `db:"user_name" json:"user_name"` - UserUsername string `db:"user_username" json:"user_username"` + NotificationName string `db:"notification_name" json:"notification_name"` + NotificationTemplateID uuid.UUID `db:"notification_template_id" json:"notification_template_id"` + Actions []byte `db:"actions" json:"actions"` + CustomMethod NullNotificationMethod `db:"custom_method" json:"custom_method"` + UserID uuid.UUID `db:"user_id" json:"user_id"` + UserEmail string `db:"user_email" json:"user_email"` + UserName string `db:"user_name" json:"user_name"` + UserUsername string `db:"user_username" json:"user_username"` } // This is used to build up the notification_message's JSON payload. @@ -3532,6 +3534,7 @@ func (q *sqlQuerier) FetchNewMessageMetadata(ctx context.Context, arg FetchNewMe var i FetchNewMessageMetadataRow err := row.Scan( &i.NotificationName, + &i.NotificationTemplateID, &i.Actions, &i.CustomMethod, &i.UserID, diff --git a/coderd/database/queries/notifications.sql b/coderd/database/queries/notifications.sql index 983d0d56e40d4..fa916c95179af 100644 --- a/coderd/database/queries/notifications.sql +++ b/coderd/database/queries/notifications.sql @@ -1,6 +1,7 @@ -- name: FetchNewMessageMetadata :one -- This is used to build up the notification_message's JSON payload. SELECT nt.name AS notification_name, + nt.id AS notification_template_id, nt.actions AS actions, nt.method AS custom_method, u.id AS user_id, diff --git a/coderd/notifications/dispatch/smtp/html.gotmpl b/coderd/notifications/dispatch/smtp/html.gotmpl index ac0527b9742d2..78ac053cc7b4f 100644 --- a/coderd/notifications/dispatch/smtp/html.gotmpl +++ b/coderd/notifications/dispatch/smtp/html.gotmpl @@ -26,6 +26,7 @@
© {{ current_year }} Coder. All rights reserved - {{ base_url }}
+