Commit b0dc8e48 by Tobin

Merge branch 'master' into 'dev_production'

chat issue See merge request !333
parents 1ea93e08 053736eb
...@@ -2034,7 +2034,7 @@ class Webservice_model extends CI_Model { ...@@ -2034,7 +2034,7 @@ class Webservice_model extends CI_Model {
$user_ids = ''; $user_ids = '';
foreach ($custIds AS $id) { foreach ($custIds AS $id) {
if(!empty($user_ids) && in_array($id,$user_ids)){ if((!empty($user_ids) && in_array($id,$user_ids)) || $id == $user_id){
continue; continue;
} }
$user_ids[] = $id['customer_id']; $user_ids[] = $id['customer_id'];
...@@ -2107,7 +2107,7 @@ class Webservice_model extends CI_Model { ...@@ -2107,7 +2107,7 @@ class Webservice_model extends CI_Model {
$user_id = $this->auth_token_get($data['auth_token']); $user_id = $this->auth_token_get($data['auth_token']);
$toUser = (is_numeric($data['user_id']))?$data['user_id']:decode_param($data['user_id']); $toUser = (is_numeric($data['user_id']))?$data['user_id']:decode_param($data['user_id']);
if(empty($toUser)){ if(empty($toUser) || $user_id == $toUser){
return array('status'=>0,'code'=>'919','message'=>'Something Went Wrong.. Try Again..'); return array('status'=>0,'code'=>'919','message'=>'Something Went Wrong.. Try Again..');
} }
$result = $this->db->get_where('chats',array('from_user'=>$user_id,'to_user'=>$toUser))->row_array(); $result = $this->db->get_where('chats',array('from_user'=>$user_id,'to_user'=>$toUser))->row_array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment