vali 6 éve
szülő
commit
cbac83bb2f

+ 9 - 3
vendor/GatewayWorker_windows/Applications/whisper/Events.php

@@ -411,17 +411,23 @@ class Events
                     $kfList = self::$global->kfList;
                     $userId = $message['data']['uid'];
                     $status = $message['data']['status'];
+                    $oldstatus = '';
                     foreach ($kfList as $k => $v) {
                         foreach ($v as $ke => $va) {
                             if ($ke == $userId) {
-                                $kfList[$k][$ke]['status'] = $status;
-                                break 2;
+                                $oldstatus = $kfList[$k][$ke]['status'];
+                                if ($oldstatus != $status) {
+                                    $kfList[$k][$ke]['status'] = $status;
+                                    break 2;
+                                } else {
+                                    return;
+                                }
                             }
                         }
                     }
                     self::$global->kfList = $kfList;
                     self::writeLogKfStatus($userId, $status);
-                    Gateway::sendToCurrentClient(json_encode(['message_type' => 'cgstatus', 'data' => ['status' => $status]]));
+                    Gateway::sendToCurrentClient(json_encode(['message_type' => 'cgstatus', 'data' => ['new_status' => $status, 'old_status' => $oldstatus]]));
 
                     break;
                 case 'changeOtherhKeFu';