Video Fixes : ps
This commit is contained in:
parent
e333bf6412
commit
017baadbd3
@ -10302,7 +10302,13 @@ class PD_Controller extends REST_Controller
|
|||||||
//print_r($records);
|
//print_r($records);
|
||||||
if (!$records['is_call_ended']) // != '' || $records['video_room_info_id'] != null)
|
if (!$records['is_call_ended']) // != '' || $records['video_room_info_id'] != null)
|
||||||
{
|
{
|
||||||
$id = $this->PD_Model->saveRecords($records, VIDEO_ROOM_INFO);
|
|
||||||
|
$video_sql_stmt = "SELECT * FROM " . VIDEO_ROOM_INFO . " where fk_pd_id = ".$records['fk_pd_id']." and isactive = 1 and room_id = '".$records['room_id']."'";
|
||||||
|
$video_records = $this->db->query($video_sql_stmt);
|
||||||
|
if ($video_records->num_rows() == 0) {
|
||||||
|
$id = $this->PD_Model->saveRecords($records, VIDEO_ROOM_INFO);log_message('ERROR', 'Video Entry Inserted'); }
|
||||||
|
else{ $id = 'Video Duplicated Entry Founded'; log_message('ERROR', 'Video Duplicated Entry Founded '); }
|
||||||
|
|
||||||
if($records['user_id'] != null){
|
if($records['user_id'] != null){
|
||||||
$log_array = array('primary_key'=>$records['fk_pd_id'],'table_name'=>'t_pd_triggered',
|
$log_array = array('primary_key'=>$records['fk_pd_id'],'table_name'=>'t_pd_triggered',
|
||||||
'field_name'=>'video_call_initiate_user','old_value'=>null,'new_value'=>null,
|
'field_name'=>'video_call_initiate_user','old_value'=>null,'new_value'=>null,
|
||||||
@ -10321,6 +10327,7 @@ class PD_Controller extends REST_Controller
|
|||||||
$records['twilo_status'] = $composition_result_data['status'];
|
$records['twilo_status'] = $composition_result_data['status'];
|
||||||
$records['composition_id'] = $composition_result_data['compositionId'];
|
$records['composition_id'] = $composition_result_data['compositionId'];
|
||||||
$id = $this->PD_Model->updateRecords($records, VIDEO_ROOM_INFO, array('room_id' => $records['room_id'], 'fk_pd_id' => $records['fk_pd_id']));
|
$id = $this->PD_Model->updateRecords($records, VIDEO_ROOM_INFO, array('room_id' => $records['room_id'], 'fk_pd_id' => $records['fk_pd_id']));
|
||||||
|
// $id = "Updated";
|
||||||
}
|
}
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user