vali 6 жил өмнө
parent
commit
6106e6190a

+ 4 - 4
vendor/GatewayWorker_windows/Applications/whisper/Events.php

@@ -451,7 +451,7 @@ class Events
             'data' => [],
         ];
         $nowkfid = isset($_SESSION['uid']) ? $_SESSION['uid'] : 0;
-        $fromgrouupid = isset($_SESSION['uid']) ? $_SESSION['group'] : 0;
+        $fromgrouupid = isset($_SESSION['group']) ? $_SESSION['group'] : 0;
 
         if (empty($fromgrouupid) || empty($nowkfid)) {
             return $return;
@@ -461,7 +461,7 @@ class Events
         $groupnamemap = self::$global->groupmap;
 
 
-        if (!$kfs || empty($nowkfid)) {
+        if (!$kfs || empty($groupnamemap)) {
             return $return;
         }
 
@@ -469,7 +469,7 @@ class Events
 
         foreach ($kfs as $gruop => $users) {
             foreach ($users as $uid => $uinfo) {
-                if ($uid != $nowkfid && $fromgrouupid == $gruop) {
+                if ($uid != $nowkfid && $fromgrouupid == $gruop && $uinfo['status'] == 1) {
                     $ret[] = ['groupid' => $gruop, 'groupname' => $groupnamemap[$gruop], 'kfuid' => $uid, 'kfname' => $uinfo['name'], 'kfjobname' => $uinfo['job_name']];
                 }
             }
@@ -1358,7 +1358,7 @@ class Events
 
                 case -1:
                     $waitMsg = '暂时没有客服上班,请稍后再咨询。';
-                    Gateway::sendToClient($client_id, json_encode(['message_type' => "noservice", 'data' => ['content' => $waitMsg]], 256));
+                    Gateway::sendToClient($client_id, json_encode(['message_type' => "notice", 'data' => ['content' => $waitMsg]], 256));
                     Gateway::closeClient($client_id);
                     return;
                     break;