From b42a1851ce546a34909143bded11a1fbe280b010 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Mon, 9 Feb 2026 08:28:18 +1100 Subject: [PATCH 1/2] Fix the logic for sending welcome emails - was causing these to not be sent --- src/api/user/auth-flow.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/user/auth-flow.service.ts b/src/api/user/auth-flow.service.ts index 7574b1d..505d0c7 100644 --- a/src/api/user/auth-flow.service.ts +++ b/src/api/user/auth-flow.service.ts @@ -242,7 +242,7 @@ export class AuthFlowService { // Send Welcome Email directly, matching legacy Java behavior if ( CommonUtils.validateString(user.reg_source) && - user.reg_source.match(/^tcBusiness$/) + !user.reg_source.match(/^tcBusiness$/) ) { // The current Welcome mail should not be sent to customers (connect users). await this.userService.notifyWelcome(userId, primaryEmailAddress); From 012778f7a7dc0e573b395b5b40098131ecb7859c Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Mon, 9 Feb 2026 08:43:15 +1100 Subject: [PATCH 2/2] Remove this check entirely --- src/api/user/auth-flow.service.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/api/user/auth-flow.service.ts b/src/api/user/auth-flow.service.ts index 505d0c7..3f4c4dd 100644 --- a/src/api/user/auth-flow.service.ts +++ b/src/api/user/auth-flow.service.ts @@ -239,14 +239,7 @@ export class AuthFlowService { ); this.logger.log(`Published 'event.user.activated' event for ${userId}`); - // Send Welcome Email directly, matching legacy Java behavior - if ( - CommonUtils.validateString(user.reg_source) && - !user.reg_source.match(/^tcBusiness$/) - ) { - // The current Welcome mail should not be sent to customers (connect users). - await this.userService.notifyWelcome(userId, primaryEmailAddress); - } + await this.userService.notifyWelcome(userId, primaryEmailAddress); // assign a default user role await this.userService.assignDefaultUserRole(userId);