fix(bot): wire aiOpponent into joined and update server messages
This commit is contained in:
@@ -147,6 +147,7 @@ async function onHello(ctx: SocketCtx, msg: Extract<ClientMessage, { type: 'hell
|
||||
mode: game.mode,
|
||||
highlightingEnabled: game.highlightingEnabled,
|
||||
opponentConnected: !!game.players[color === 'w' ? 'b' : 'w']?.socket,
|
||||
aiOpponent: game.aiOpponent,
|
||||
});
|
||||
|
||||
// Notify peer that we're connected.
|
||||
@@ -283,6 +284,7 @@ function sendUpdateTo(
|
||||
drawOffer,
|
||||
endReason: game.endReason,
|
||||
winner: game.winner ?? null,
|
||||
aiOpponent: game.aiOpponent,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user