From a7afff7465bc99b7dc6295e870796d643e7533ed Mon Sep 17 00:00:00 2001 From: nitin <142569587+ehconitin@users.noreply.github.com> Date: Fri, 19 Jun 2026 13:07:21 +0530 Subject: [PATCH] fix call recording bot automatic leave activate after bug (#21820) hardcoded activate_after -- 0 on everyone_left_timeout was getting rejected by recall with a 400 (activate_after can't be 0). pulled it into a named const, set to 1. its weird -- recall doc says default is 0 -- but its erroring out for us if we send zero. looks like the 0 default only applies when you leave the field out, not when you pass it explicitly(did not verify). keeping it as lowest possible value (1) for now. what the property does -- after the meet starts, how long before the bot starts watching the "everyone left" timeout. 1s is basically immediate, which is what we wanted with 0 anyway. Review in cubic --- .../logic-functions/constants/recall-bot-automatic-leave.ts | 3 ++- .../recall-bot-everyone-left-min-activate-after-seconds.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/constants/recall-bot-everyone-left-min-activate-after-seconds.ts diff --git a/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/constants/recall-bot-automatic-leave.ts b/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/constants/recall-bot-automatic-leave.ts index 57ef4b2b29..633e4be73b 100644 --- a/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/constants/recall-bot-automatic-leave.ts +++ b/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/constants/recall-bot-automatic-leave.ts @@ -1,5 +1,6 @@ import { isUndefined } from '@sniptt/guards'; +import { RECALL_BOT_EVERYONE_LEFT_MIN_ACTIVATE_AFTER_SECONDS } from 'src/logic-functions/constants/recall-bot-everyone-left-min-activate-after-seconds'; import { RECALL_BOT_EVERYONE_LEFT_TIMEOUT_SECONDS_ENV_VAR_NAME } from 'src/logic-functions/constants/recall-bot-everyone-left-timeout-seconds-env-var-name'; import { RECALL_BOT_NOONE_JOINED_TIMEOUT_SECONDS_ENV_VAR_NAME } from 'src/logic-functions/constants/recall-bot-noone-joined-timeout-seconds-env-var-name'; import { RECALL_BOT_WAITING_ROOM_TIMEOUT_SECONDS_ENV_VAR_NAME } from 'src/logic-functions/constants/recall-bot-waiting-room-timeout-seconds-env-var-name'; @@ -41,7 +42,7 @@ export const getRecallBotAutomaticLeave = (): if (!isUndefined(everyoneLeftTimeoutSeconds)) { automaticLeave.everyone_left_timeout = { timeout: everyoneLeftTimeoutSeconds, - activate_after: 0, + activate_after: RECALL_BOT_EVERYONE_LEFT_MIN_ACTIVATE_AFTER_SECONDS, }; } diff --git a/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/constants/recall-bot-everyone-left-min-activate-after-seconds.ts b/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/constants/recall-bot-everyone-left-min-activate-after-seconds.ts new file mode 100644 index 0000000000..1279213348 --- /dev/null +++ b/packages/twenty-apps/internal/twenty-meeting-bot/src/logic-functions/constants/recall-bot-everyone-left-min-activate-after-seconds.ts @@ -0,0 +1 @@ +export const RECALL_BOT_EVERYONE_LEFT_MIN_ACTIVATE_AFTER_SECONDS = 1;