|
|
@@ -627,6 +627,15 @@ class Events
|
|
|
sleep(2);
|
|
|
}
|
|
|
|
|
|
+ $group = $message['group'];
|
|
|
+ $onlinekf = self::$global->kfList;
|
|
|
+ if (!isset($onlinekf[$group]) || count($onlinekf[$group]) <= 0) {
|
|
|
+ Gateway::sendToClient($client_id, json_encode(['message_type' => 'notice', 'content' => '暂时没有客服上班,请稍后再咨询。'], 256));
|
|
|
+ sleep(2);
|
|
|
+ Gateway::closeClient($client_id);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (!array_key_exists($message['uid'], $userList)) {
|
|
|
do {
|
|
|
$NewUserList = $userList;
|
|
|
@@ -809,6 +818,7 @@ class Events
|
|
|
'message_type' => 'userClose',
|
|
|
'data' => [
|
|
|
'content' => '用户连接已断开',
|
|
|
+ 'id' => $uid,
|
|
|
'time' => date('H:i'),
|
|
|
]
|
|
|
];
|