From 31ae09483f97536466790825e21b0fd008a57385 Mon Sep 17 00:00:00 2001 From: Lucas Kostka Date: Mon, 18 Mar 2024 13:44:11 +0100 Subject: [PATCH] engagement time: only send the parameter if non-zero --- src/requestBuilder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/requestBuilder.ts b/src/requestBuilder.ts index 9ea48ae..1e3c969 100644 --- a/src/requestBuilder.ts +++ b/src/requestBuilder.ts @@ -92,7 +92,7 @@ function getToolRequest( requestBody['cid'] = cid //const notTheFirstSession = parseInt(requestBody['_s'] as string) > 1 - const engagementDuration = client.get('engagementDuration') + const engagementDuration = parseInt(String(client.get('engagementDuration')), 10) || 0; if (engagementDuration) { requestBody._et = engagementDuration }