|
@@ -1469,6 +1469,17 @@ class Party extends Api
|
|
if(empty($seatlist)){
|
|
if(empty($seatlist)){
|
|
$matedata['seat1'] = $newseat;
|
|
$matedata['seat1'] = $newseat;
|
|
}else{
|
|
}else{
|
|
|
|
+ //第一遍轮询麦位,尝试找到这个人,如果找到在任何一个麦位,立刻return
|
|
|
|
+ foreach($seatlist as $k => $seat){
|
|
|
|
+ $seat = json_decode($seat,true);
|
|
|
|
+
|
|
|
|
+ //找到当前用户所在的麦位
|
|
|
|
+ if(isset($seat['rtcUid']) && !empty($seat['rtcUid']) && $seat['rtcUid'] == $user_id){
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //第二遍轮询麦位,找一个空麦位,放进去
|
|
$matedata = [];
|
|
$matedata = [];
|
|
foreach($seatlist as $k => $seat){
|
|
foreach($seatlist as $k => $seat){
|
|
$seat = json_decode($seat,true);
|
|
$seat = json_decode($seat,true);
|