mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
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:
parent
a9ee72b2bc
commit
621dd7f67d
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue