From 621dd7f67d6b5da4fba75c7b40a54d9e1f7a7956 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 11 Jul 2025 19:14:02 -0500 Subject: [PATCH] Website: Update zoom webhook (#30809) Closes: https://github.com/fleetdm/confidential/issues/11370 Changes: - Updated the receive-from-zoom webhook to return a 200 response to Zoom if a call has no transcript (e.g., the host stops the recording at the start of the meeting). --- website/api/controllers/webhooks/receive-from-zoom.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/api/controllers/webhooks/receive-from-zoom.js b/website/api/controllers/webhooks/receive-from-zoom.js index bffe801aa3..4d20ae24c4 100644 --- a/website/api/controllers/webhooks/receive-from-zoom.js +++ b/website/api/controllers/webhooks/receive-from-zoom.js @@ -29,6 +29,7 @@ module.exports = { success: { description: 'A webhook event has successfully been received.'}, callInfoNotFound: {description: 'No information about this call could be found in the Zoom API.', responseType: 'badRequest'}, callTranscriptNotFound: {description: 'No transcript for this call could be found in the Zoom API.', responseType: 'badRequest'}, + callHasNoTranscript: {description: 'The receive-from-zoom webhook received an event about a call with no transcript.', responseType: 'ok'}, unexpectedEvent: {description: 'The receive-from-zoom webhook received an unsupported event.', responseType: 'badRequest'}, }, @@ -112,6 +113,12 @@ module.exports = { return new Error(`When sending a request to get a transcript of a Zoom recording, an error occured. Full error ${require('util').inspect(err, {depth: 3})}`); }); + // If a call is recorded, but a user stops the recording before anything is said, the call interactions will not have any participants. + // If this happens, we'll throw callTranscriptNotFound exit, which returns a 200 response to Zoom. + if(!callTranscript.participants) { + throw 'callHasNoTranscript'; + } + let allSpeakersOnThisCall = []; allSpeakersOnThisCall = allSpeakersOnThisCall.concat(callTranscript.participants); let tokenForNextPageOfResults = callTranscript.next_page_token;