diff --git a/application/models/Webservice_model.php b/application/models/Webservice_model.php index 4effaf9..df331a8 100644 --- a/application/models/Webservice_model.php +++ b/application/models/Webservice_model.php @@ -2118,10 +2118,10 @@ class Webservice_model extends CI_Model { $toCustData = $this->db->get_where('customer',array('customer_id'=>$toUser))->row_array(); $frmCustData = $this->db->get_where('customer',array('customer_id'=>$user_id))->row_array(); - $fcmData = array('id'=>$toUser,'param'=>'friend_id', + $fcmData = array('id'=>$user_id,'param'=>'friend_id', 'title'=>'New Chat Request', - 'message'=>'You got a New Chat Request from '.$toCustData['name']); - push_sent_cancel(1,$frmCustData['fcm_token'],$fcmData); + 'message'=>'You got a New Chat Request from '.$frmCustData['name']); + push_sent_cancel(1,$toCustData['fcm_token'],$fcmData); } else if (!empty($result) && $result['type'] == '0'){ $this->db->update('chats',array('type'=>'1'),array('chat_id'=>$result['chat_id'])); }