Merge pull request #19109 from overleaf/tm-project-joined-add-project-id

Add projectId to project-joined event

GitOrigin-RevId: 222e0acc8764592344e384d1a6a5a2327d4161f5
This commit is contained in:
Thomas 2024-06-26 12:14:42 +02:00 committed by Copybot
parent d21da7d084
commit 70bf7b2aab
2 changed files with 4 additions and 2 deletions

View file

@ -156,6 +156,7 @@ const TokenAccessHandler = {
projectId = new ObjectId(projectId.toString())
Analytics.recordEventForUserInBackground(userId, 'project-joined', {
mode: 'read-only',
projectId: projectId.toString(),
})
return await Project.updateOne(
@ -173,6 +174,7 @@ const TokenAccessHandler = {
projectId = new ObjectId(projectId.toString())
Analytics.recordEventForUserInBackground(userId, 'project-joined', {
mode: 'read-write',
projectId: projectId.toString(),
})
return await Project.updateOne(

View file

@ -130,7 +130,7 @@ describe('TokenAccessHandler', function () {
this.Analytics.recordEventForUserInBackground,
this.userId,
'project-joined',
{ mode: 'read-only' }
{ mode: 'read-only', projectId: this.projectId.toString() }
)
})
@ -178,7 +178,7 @@ describe('TokenAccessHandler', function () {
this.Analytics.recordEventForUserInBackground,
this.userId,
'project-joined',
{ mode: 'read-write' }
{ mode: 'read-write', projectId: this.projectId.toString() }
)
})