mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-29 19:57:14 +00:00
🐛(summary) do not save null emails in analytics
In case the email is not provided we should not update the analytics email value.
This commit is contained in:
committed by
aleb_the_flash
parent
e7f15b50ff
commit
f88c0307ea
@@ -59,16 +59,16 @@ async def create_transcribe_task_v2(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
properties = {}
|
||||||
|
if request.user_email:
|
||||||
|
properties["$set"] = {"email": request.user_email}
|
||||||
|
|
||||||
# We track the request, this also properly initializes the user in the
|
# We track the request, this also properly initializes the user in the
|
||||||
# analytics system, so that later feature flags work properly
|
# analytics system, so that later feature flags work properly
|
||||||
analytics.capture(
|
analytics.capture(
|
||||||
settings.posthog_transcript_request,
|
settings.posthog_transcript_request,
|
||||||
request.user_sub,
|
request.user_sub,
|
||||||
properties={
|
properties=properties,
|
||||||
"$set": {
|
|
||||||
"email": request.user_email,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return TranscribeWebhookPendingPayload(job_id=task.id).model_dump()
|
return TranscribeWebhookPendingPayload(job_id=task.id).model_dump()
|
||||||
@@ -92,14 +92,15 @@ async def create_summarize_task_v2(
|
|||||||
|
|
||||||
# We track the request, this also properly initializes the user in the
|
# We track the request, this also properly initializes the user in the
|
||||||
# analytics system, so that later feature flags work properly
|
# analytics system, so that later feature flags work properly
|
||||||
|
|
||||||
|
properties = {}
|
||||||
|
if request.user_email:
|
||||||
|
properties["$set"] = {"email": request.user_email}
|
||||||
|
|
||||||
analytics.capture(
|
analytics.capture(
|
||||||
settings.posthog_summary_request,
|
settings.posthog_summary_request,
|
||||||
request.user_sub,
|
request.user_sub,
|
||||||
properties={
|
properties=properties,
|
||||||
"$set": {
|
|
||||||
"email": request.user_email,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
return SummarizeWebhookPendingPayload(job_id=task.id).model_dump()
|
return SummarizeWebhookPendingPayload(job_id=task.id).model_dump()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user