function zoomapi_validate_recording_tracking_info in Zoom API 7.2
Validate recording data.
2 calls to zoomapi_validate_recording_tracking_info()
- zoomapi_get_recording_download_tracking_info in ./
zoomapi.module - Get recording download tracking info.
- zoomapi_get_unsuccessful_recording_download_tracking_info in ./
zoomapi.module - Get unsuccessful recording downloads.
File
- ./
zoomapi.module, line 1047 - Main file for the Zoom API module.
Code
function zoomapi_validate_recording_tracking_info($info) {
// It appears that around April 11th, 2020 the recording data provided in
// webhooks is incorrect, causing automated downloads to fail. This also
// happens to be around the time Zoom faced many of the security issues
// during the Coronavirus outbreak... hence Zoom support has been
// unreachable. To work around this, some logic checks are put in place
// to attempt to validate the recording data.
if (empty($info['total_size'])) {
return FALSE;
}
if ($info['recording_count'] !== count($info['recording_files'])) {
return FALSE;
}
foreach ($info['recording_files'] as $recording_file) {
if (empty($recording_file['file_type'])) {
return FALSE;
}
if (empty($recording_file['file_size'])) {
return FALSE;
}
if ($recording_file['status'] !== 'completed') {
return FALSE;
}
}
return TRUE;
}