fix(lobby): ready status anzeigen und Spielstart absichern

This commit is contained in:
Tim Krampitz
2026-09-10 21:52:21 +02:00
parent 01e62652f5
commit 01b6a41bc6
6 changed files with 43 additions and 6 deletions

View File

@@ -110,6 +110,8 @@ public class GameHub : Hub
await Groups.AddToGroupAsync(connectionId, game.LobbyCode);
await Clients.Caller.SendAsync("LobbyCreated", new { GameId = game.Id, LobbyCode = game.LobbyCode });
var gameState = await _gameService.GetGameStateAsync(game.Id);
await Clients.Caller.SendAsync("PlayerJoined", gameState);
_logger.LogInformation("Lobby {LobbyCode} created by user {UserId}", game.LobbyCode, userId);
}
catch (UnauthorizedAccessException)