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 {
$user_ids = '';
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;
}
$user_ids[] = $id['customer_id'];
......@@ -2107,7 +2107,7 @@ class Webservice_model extends CI_Model {
$user_id = $this->auth_token_get($data['auth_token']);
$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..');
}
$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