diff --git a/services/web/app/src/Features/Email/EmailBuilder.js b/services/web/app/src/Features/Email/EmailBuilder.js index dcd375668b..46e6d5d95d 100644 --- a/services/web/app/src/Features/Email/EmailBuilder.js +++ b/services/web/app/src/Features/Email/EmailBuilder.js @@ -307,12 +307,12 @@ templates.projectInvite = CTAEmailTemplate({ templates.verifyEmailToJoinTeam = CTAEmailTemplate({ subject(opts) { return `${_.escape( - SpamSafe.safeUserName(opts.inviterName, 'A collaborator') + _formatUserNameAndEmail(opts.inviter, 'A collaborator') )} has invited you to join a team on ${settings.appName}` }, title(opts) { return `${_.escape( - SpamSafe.safeUserName(opts.inviterName, 'A collaborator') + _formatUserNameAndEmail(opts.inviter, 'A collaborator') )} has invited you to join a team on ${settings.appName}` }, message(opts) { diff --git a/services/web/app/src/Features/Subscription/TeamInvitesHandler.js b/services/web/app/src/Features/Subscription/TeamInvitesHandler.js index 9478f8ea9e..fa55f5cc7a 100644 --- a/services/web/app/src/Features/Subscription/TeamInvitesHandler.js +++ b/services/web/app/src/Features/Subscription/TeamInvitesHandler.js @@ -189,7 +189,7 @@ var createInvite = function(subscription, email, inviter, callback) { const opts = { to: email, - inviterName, + inviter, acceptInviteUrl: `${settings.siteUrl}/subscription/invites/${ invite.token }/`, diff --git a/services/web/test/unit/src/Subscription/TeamInvitesHandlerTests.js b/services/web/test/unit/src/Subscription/TeamInvitesHandlerTests.js index 626a75dd10..382b64a1d8 100644 --- a/services/web/test/unit/src/Subscription/TeamInvitesHandlerTests.js +++ b/services/web/test/unit/src/Subscription/TeamInvitesHandlerTests.js @@ -159,7 +159,7 @@ describe('TeamInvitesHandler', function() { 'verifyEmailToJoinTeam', sinon.match({ to: 'john.snow@example.com', - inviterName: 'Daenerys Targaryen (daenerys@example.com)', + inviter: this.manager, acceptInviteUrl: `http://example.com/subscription/invites/${ this.newToken }/`