Fix invite url is not passed correctly to managed users invitation emails

GitOrigin-RevId: f334215a7c83088df175467561d41537cfe9e2a8
This commit is contained in:
M Fahru 2023-09-12 09:49:51 -07:00 committed by Copybot
parent 98c8ee0e1f
commit 7216d35174

View file

@ -4,6 +4,7 @@ const { GroupPolicy } = require('../../models/GroupPolicy')
const { User } = require('../../models/User')
const ManagedUsersPolicy = require('./ManagedUsersPolicy')
const OError = require('@overleaf/o-error')
const settings = require('@overleaf/settings')
const {
UserNotFoundError,
SubscriptionNotFoundError,
@ -176,6 +177,7 @@ async function _sendEmailToGroupMembers(subscriptionId) {
to: recipient.email,
admin: subscription.admin_id,
groupName: subscription.teamName,
acceptInviteUrl: `${settings.siteUrl}/subscription/${subscriptionId}/enrollment/`,
}
EmailHandler.sendDeferredEmail(
'surrenderAccountForManagedUsers',