diff --git a/services/web/app/src/Features/Email/EmailBuilder.js b/services/web/app/src/Features/Email/EmailBuilder.js index 41f0ba3847..db2beabbbf 100644 --- a/services/web/app/src/Features/Email/EmailBuilder.js +++ b/services/web/app/src/Features/Email/EmailBuilder.js @@ -368,12 +368,12 @@ templates.reconfirmEmail = ctaTemplate({ templates.verifyEmailToJoinTeam = ctaTemplate({ subject(opts) { - return `${_.escape( + return `${opts.reminder ? 'Reminder: ' : ''}${_.escape( _formatUserNameAndEmail(opts.inviter, 'A collaborator') )} has invited you to join a group subscription on ${settings.appName}` }, title(opts) { - return `${_.escape( + return `${opts.reminder ? 'Reminder: ' : ''}${_.escape( _formatUserNameAndEmail(opts.inviter, 'A collaborator') )} has invited you to join a group subscription on ${settings.appName}` }, @@ -456,9 +456,9 @@ templates.inviteNewUserToJoinManagedUsers = ctaTemplate({ }, secondaryMessage(opts) { return [ - `User accounts in this group are managed by ${_.escape( + `User accounts in this group are managed by ${_.escape( _formatUserNameAndEmail(opts.admin, 'an admin') - )}.`, + )}.`, `If you accept, the owner of the group subscription will have admin rights over your account and control over your stuff.`, `What is ${settings.appName}?`, `${settings.appName} is the collaborative online LaTeX editor loved by researchers and technical writers. With thousands of ready-to-use templates and an array of LaTeX learning resources you’ll be up and running in no time.`, diff --git a/services/web/app/src/Features/Subscription/TeamInvitesController.js b/services/web/app/src/Features/Subscription/TeamInvitesController.js index aef4cd853c..2677d234bf 100644 --- a/services/web/app/src/Features/Subscription/TeamInvitesController.js +++ b/services/web/app/src/Features/Subscription/TeamInvitesController.js @@ -267,9 +267,17 @@ async function resendInvite(req, res, next) { await rateLimiters.resendGroupInvite.consume(userEmail) const existingUser = await UserGetter.promises.getUserByAnyEmail(userEmail) - const emailTemplate = existingUser - ? 'verifyEmailToJoinManagedUsers' - : 'inviteNewUserToJoinManagedUsers' + + let emailTemplate + if (subscription.managedUsersEnabled) { + if (existingUser) { + emailTemplate = 'verifyEmailToJoinManagedUsers' + } else { + emailTemplate = 'inviteNewUserToJoinManagedUsers' + } + } else { + emailTemplate = 'verifyEmailToJoinTeam' + } EmailHandler.sendDeferredEmail(emailTemplate, opts) } catch (err) {