|
@@ -137,9 +137,9 @@ class Events
|
|
|
|
|
|
|
|
$message = json_decode($message, true);
|
|
$message = json_decode($message, true);
|
|
|
// 验证客服是否被删除或禁用.
|
|
// 验证客服是否被删除或禁用.
|
|
|
- if (isset($message['data']['conversationId'])) {
|
|
|
|
|
- self::prohibitServer($message['data']['conversationId']);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (isset($message['data']['conversationId'])) {
|
|
|
|
|
+// self::prohibitServer($message['data']['conversationId']);
|
|
|
|
|
+// }
|
|
|
if (isset($message['type'])) {
|
|
if (isset($message['type'])) {
|
|
|
switch ($message['type']) {
|
|
switch ($message['type']) {
|
|
|
case 'mydebug':
|
|
case 'mydebug':
|
|
@@ -223,21 +223,21 @@ class Events
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//更新用户缓存信息
|
|
//更新用户缓存信息
|
|
|
- public static function prohibitServer($serviceLogId)
|
|
|
|
|
- {
|
|
|
|
|
- $data = json_decode(self::$redis->HGET('SERVICELOG', $serviceLogId), true);
|
|
|
|
|
- $userInfo = self::$db->select('status')->from('ws_users')->where('id=:id')->bindValues(['id' => $data['kf_id']])->row();
|
|
|
|
|
- if (!$userInfo || $userInfo['status'] != 1) {
|
|
|
|
|
- $chat_message = [
|
|
|
|
|
- 'message_type' => 'error',
|
|
|
|
|
- 'data' => [
|
|
|
|
|
- 'msg' => '账号异常!'
|
|
|
|
|
- ]
|
|
|
|
|
- ];
|
|
|
|
|
- Gateway::sendToClient($data['kf_client_id'], json_encode($chat_message, 256));
|
|
|
|
|
- Gateway::closeClient($data['kf_client_id']);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// public static function prohibitServer($serviceLogId)
|
|
|
|
|
+// {
|
|
|
|
|
+// $data = json_decode(self::$redis->HGET('SERVICELOG', $serviceLogId), true);
|
|
|
|
|
+// $userInfo = self::$db->select('status')->from('ws_users')->where('id=:id')->bindValues(['id' => $data['kf_id']])->row();
|
|
|
|
|
+// if (!$userInfo || $userInfo['status'] != 1) {
|
|
|
|
|
+// $chat_message = [
|
|
|
|
|
+// 'message_type' => 'error',
|
|
|
|
|
+// 'data' => [
|
|
|
|
|
+// 'msg' => '账号异常!'
|
|
|
|
|
+// ]
|
|
|
|
|
+// ];
|
|
|
|
|
+// Gateway::sendToClient($data['kf_client_id'], json_encode($chat_message, 256));
|
|
|
|
|
+// Gateway::closeClient($data['kf_client_id']);
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
//更新用户缓存信息
|
|
//更新用户缓存信息
|
|
|
public static function updateusercache($client_id, $dataArray)
|
|
public static function updateusercache($client_id, $dataArray)
|