mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-07 17:32:17 +00:00
Merge pull request #2434 from overleaf/ta-team-invite-email-fix
Fix Spam Safe Inviter Name for Group Invites GitOrigin-RevId: e5e01afd53d22cd53016352c32ad1de28137ea17
This commit is contained in:
parent
2705aea54c
commit
a5757b447c
3 changed files with 4 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -189,7 +189,7 @@ var createInvite = function(subscription, email, inviter, callback) {
|
|||
|
||||
const opts = {
|
||||
to: email,
|
||||
inviterName,
|
||||
inviter,
|
||||
acceptInviteUrl: `${settings.siteUrl}/subscription/invites/${
|
||||
invite.token
|
||||
}/`,
|
||||
|
|
|
@ -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
|
||||
}/`
|
||||
|
|
Loading…
Add table
Reference in a new issue