From 679429447d45160fa9196524edcb9fd557d08ecf Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Fri, 17 Jan 2025 14:31:24 +0100 Subject: [PATCH] fix(auth): update onboarding activation for specific users (#9702) Adjust onboarding activation to trigger only for new users with pictures. This prevents unnecessary activation steps for other user types, streamlining the flow. --- .../engine/core-modules/auth/services/sign-in-up.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts index 384865c8d..41ba1c677 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/sign-in-up.service.ts @@ -98,7 +98,6 @@ export class SignInUpService { }; } - // with global invitation flow if (params.workspace) { const updatedUser = await this.signInUpOnExistingWorkspace({ workspace: params.workspace, @@ -246,7 +245,9 @@ export class SignInUpService { const user = Object.assign(currentUser, updatedUser); - await this.activateOnboardingForUser(user, params.workspace); + if (params.userData.type === 'newUserWithPicture') { + await this.activateOnboardingForUser(user, params.workspace); + } return user; }