|
|
@@ -272,7 +272,7 @@ class Events
|
|
|
break;
|
|
|
// 聊天
|
|
|
case 'getkfonlines':
|
|
|
- self::getkfonlines($client_id, $message);
|
|
|
+ Gateway::sendToCurrentClient(json_encode(self::getkfonlines(),256));
|
|
|
break;
|
|
|
case 'chatMessage':
|
|
|
$client = Gateway::getClientIdByUid($message['data']['to_id']);
|
|
|
@@ -445,7 +445,8 @@ class Events
|
|
|
|
|
|
}
|
|
|
|
|
|
- public static function getkfonlines($client_id, $message)
|
|
|
+ //获取在线客服列表
|
|
|
+ public static function getkfonlines()
|
|
|
{
|
|
|
$return = [
|
|
|
'message_type' => 'onlinekfs',
|
|
|
@@ -453,8 +454,7 @@ class Events
|
|
|
];
|
|
|
$kfs = self::$global->kfList;
|
|
|
if (!$kfs) {
|
|
|
- Gateway::sendToCurrentClient(json_encode($return, 256));
|
|
|
- return;
|
|
|
+ return $return;
|
|
|
}
|
|
|
|
|
|
$ret = [];
|
|
|
@@ -466,9 +466,7 @@ class Events
|
|
|
}
|
|
|
}
|
|
|
$return['data'] = $ret;
|
|
|
-
|
|
|
- Gateway::sendToCurrentClient(json_encode($return, 256));
|
|
|
- return;
|
|
|
+ return $return;
|
|
|
}
|
|
|
|
|
|
|