Merge pull request #19814 from overleaf/tm-link-sharing-project-joined-event-for-treatment

Add project-joined event when adding as Editor via link sharing

GitOrigin-RevId: 40f538376b90a45877859be9e48a0b4c45c9641d
This commit is contained in:
Thomas
2024-08-07 08:05:12 +00:00
committed by Copybot
parent d2464abc7c
commit 2ee528a9d2
2 changed files with 18 additions and 0 deletions
@@ -340,6 +340,14 @@ async function grantTokenAccessReadAndWrite(req, res, next) {
req.ip,
{ privileges: 'readAndWrite' }
)
AnalyticsManager.recordEventForUserInBackground(
userId,
'project-joined',
{
mode: 'read-write',
projectId: project._id.toString(),
}
)
// Currently does not enforce the collaborator limit (warning phase)
await CollaboratorsHandler.promises.addUserIdToProject(
project._id,