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).
This commit is contained in:
Eric 2025-07-11 19:14:02 -05:00 committed by GitHub
parent a9ee72b2bc
commit 621dd7f67d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;