From 8343fb7450e1c9272c3f725fb4587da525741b9a Mon Sep 17 00:00:00 2001 From: jmgasper Date: Tue, 1 Sep 2026 10:35:45 +1000 Subject: [PATCH] fix: pass email change links to dynamic template --- README.md | 2 +- src/api/user/email-change.service.spec.ts | 1 + src/api/user/email-change.service.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c6a49d..28f42c6 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ The source HTML for the proposed-address confirmation message is stored at service topic map so `member.action.email.profile.emailchange.verification` uses the SendGrid template created from that file. -The template consumes the following substitutions published by +The template consumes the following dynamic template data published by `EmailChangeService`: - `subject`: email subject configured as `Topcoder - Email Change Verification`. diff --git a/src/api/user/email-change.service.spec.ts b/src/api/user/email-change.service.spec.ts index daf0f44..b6479ae 100644 --- a/src/api/user/email-change.service.spec.ts +++ b/src/api/user/email-change.service.spec.ts @@ -123,6 +123,7 @@ describe('EmailChangeService', () => { 'member.action.email.profile.emailchange.verification', ); expect(validationCall[1].recipients).toEqual(['new@example.com']); + expect(validationCall[1].version).toBe('v3'); const validationUrl = new URL( validationCall[1].data.verificationAgreeUrl, ); diff --git a/src/api/user/email-change.service.ts b/src/api/user/email-change.service.ts index 2c5f5f5..7b68a43 100644 --- a/src/api/user/email-change.service.ts +++ b/src/api/user/email-change.service.ts @@ -619,6 +619,7 @@ export class EmailChangeService { verificationDisagreeUrl: cancelUrl, }, recipients: [email], + version: 'v3', }, ); }