diff --git a/packages/twenty-apps/public/call-recorder/package.json b/packages/twenty-apps/public/call-recorder/package.json index cfaa9e8a5d..33f949abaf 100644 --- a/packages/twenty-apps/public/call-recorder/package.json +++ b/packages/twenty-apps/public/call-recorder/package.json @@ -1,6 +1,6 @@ { "name": "@twentyhq/call-recorder", - "version": "1.7.0", + "version": "1.7.1", "license": "MIT", "engines": { "node": "^24.5.0", diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/not-recorded-recall-sub-codes.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/not-recorded-recall-sub-codes.ts index 6acfaba101..9735865a21 100644 --- a/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/not-recorded-recall-sub-codes.ts +++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/constants/not-recorded-recall-sub-codes.ts @@ -2,8 +2,6 @@ export const NOT_RECORDED_RECALL_SUB_CODES: readonly string[] = [ 'meeting_not_started', 'timeout_exceeded_noone_joined', - 'timeout_exceeded_only_bots_detected_using_participant_names', - 'timeout_exceeded_only_bots_detected_using_participant_events', 'timeout_exceeded_waiting_room', 'call_ended_by_platform_waiting_room_timeout', 'bot_kicked_from_waiting_room', diff --git a/packages/twenty-apps/public/call-recorder/src/logic-functions/flows/__tests__/handle-recall-webhook.test.ts b/packages/twenty-apps/public/call-recorder/src/logic-functions/flows/__tests__/handle-recall-webhook.test.ts index 1735a4860b..91a543bd1a 100644 --- a/packages/twenty-apps/public/call-recorder/src/logic-functions/flows/__tests__/handle-recall-webhook.test.ts +++ b/packages/twenty-apps/public/call-recorder/src/logic-functions/flows/__tests__/handle-recall-webhook.test.ts @@ -323,6 +323,53 @@ describe('handleRecallWebhook', () => { ]); }); + it('treats a bot-detection timeout as a normal call ending', async () => { + const client = new FakeCoreApiClient([ + { + id: 'call-recording-1', + status: 'RECORDING', + externalBotId: 'recall-bot-1', + }, + ]); + + const result = await handleRecallWebhook({ + client: client as unknown as CoreApiClient, + body: { + event: 'bot.status_change', + data: { + bot: { + id: 'recall-bot-1', + metadata: { + twentyWorkspaceId: WORKSPACE_ID, + twentyCallRecordingId: 'call-recording-1', + }, + }, + status: { + code: 'call_ended', + sub_code: + 'timeout_exceeded_only_bots_detected_using_participant_names', + }, + }, + }, + }); + + expect(result).toEqual({ + status: 'updated', + event: 'bot.status_change', + callRecordingId: 'call-recording-1', + callRecordingStatus: 'PROCESSING', + }); + expect(client.mutations).toEqual([ + { + id: 'call-recording-1', + data: { + status: 'PROCESSING', + externalBotId: 'recall-bot-1', + }, + }, + ]); + }); + it('ignores a no-capture sub code on a non-terminal status code', async () => { const client = new FakeCoreApiClient([ {