wesmiler 2 år sedan
förälder
incheckning
58e85637d2
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      app/Console/Commands/SocketServer.php

+ 2 - 2
app/Console/Commands/SocketServer.php

@@ -123,7 +123,7 @@ class SocketServer extends Command
         // 消息处理
         $frameId = $frame->fd;
         $data = $frame->data ? json_decode($frame->data, true) : [];
-        $fromUid = isset($data['from_user_id']) ? intval($data['from_user_id']) : 0;
+        $fromUid = isset($data['from_uid']) ? intval($data['from_uid']) : 0;
         $token = isset($data['token']) ? $data['token'] : '';
         $op = isset($data['op']) ? $data['op'] : '';
         $scene = isset($data['scene']) && $data['scene'] ? $data['scene'] : 'chat';
@@ -137,7 +137,7 @@ class SocketServer extends Command
         }
 
         $uuid = isset($data['uuid']) ? $data['uuid'] : uniqid();
-        $toUid = isset($data['to_user_id']) ? intval($data['to_user_id']) : 0;
+        $toUid = isset($data['to_uid']) ? intval($data['to_uid']) : 0;
         $apiUrl = env('APP_URL','');
         $chatKey = isset($data['chat_key']) ? trim($data['chat_key']) : '';
         $chatKey = $chatKey ? $chatKey : getChatKey($fromUid, $toUid);