Commit dbd8809f authored by hujun's avatar hujun

判断消息来源

parent 5a45320b
......@@ -211,11 +211,15 @@ class ChatService
$where['only_id'] = $target;
//0用户 1经纪人
if ($is_user) {
$where['type'] = 1;
if (strstr($target,'user')) {
$where['type'] = 2; //对用户发
} elseif (strstr($target,'agent')) {
$where['type'] = 1; //对经纪人发
} else {
$where['type'] = 2;
return false;
}
$m_user = new ChatUser();
......@@ -223,7 +227,6 @@ class ChatService
$user_where['status'] = 0;
$user_arr = $m_user->getChatUserOne('user_id', $user_where);
$user_id = empty($user_arr['user_id']) ? 0:$user_arr['user_id'] ;
$info = $userExt->getChatUserExtByUserId($where, 'a.id,a.ext_id,a.device_id,a.push_id,b.user_id');
if (count($info) <= 0) {
......
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