fix(idiom): split display - winner sees in private, others in public
This commit is contained in:
@@ -197,7 +197,7 @@ class IdiomQuizController extends Controller
|
||||
$user->save();
|
||||
}
|
||||
|
||||
// 广播结果
|
||||
// 广播结果(前端通过 IdiomGameAnswered 事件做分屏显示)
|
||||
broadcast(new IdiomGameAnswered(
|
||||
roomId: $roomId,
|
||||
roundId: $round->id,
|
||||
@@ -207,7 +207,7 @@ class IdiomQuizController extends Controller
|
||||
rewardExp: $round->reward_exp,
|
||||
));
|
||||
|
||||
// 推 MessageSent 系统通知
|
||||
// 存聊天记录(不广播,避免重复显示)
|
||||
$resultMsg = [
|
||||
'id' => $this->chatState->nextMessageId($roomId),
|
||||
'room_id' => $roomId,
|
||||
@@ -220,7 +220,6 @@ class IdiomQuizController extends Controller
|
||||
'sent_at' => now()->toDateTimeString(),
|
||||
];
|
||||
$this->chatState->pushMessage($roomId, $resultMsg);
|
||||
broadcast(new \App\Events\MessageSent($roomId, $resultMsg));
|
||||
|
||||
\Illuminate\Support\Facades\Redis::del($lockKey);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user