wesmiler il y a 2 ans
Parent
commit
8075207021
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      app/Console/Commands/SocketServer.php

+ 3 - 1
app/Console/Commands/SocketServer.php

@@ -273,8 +273,10 @@ class SocketServer extends Command
                     // 推送消息给对方
                     $msgData['nickname'] = MemberModel::where(['id'=> $fromUid])->value('nickname');
                     $msgData['time_text'] = dateFormat($msgData['create_time']);
-                    $this->sendMsg($frameId, ['success' => true, 'op' => 'push_live', 'scene'=> $scene, 'data' => $msgData, 'message' => '发送成功:' . $frameId]);
+                    //$this->sendMsg($frameId, ['success' => true, 'op' => 'push_live', 'scene'=> $scene, 'data' => $msgData, 'message' => '发送成功:' . $frameId]);
                     $fids =  RedisService::get("chats:bindFds:{$chatKey}");
+                    $fids = array_values($fids);
+                    $fids = array_unique($fids);
                     if($fids){
                         foreach($fids as $fd){
                             $this->sendMsg($fd, ['success' => true, 'op' => 'push_live' ,'scene'=> $scene, 'data' => $msgData, 'message' => '推送消息成功:' . $fd]);