From e39519f9b6c6c52dac82ed6e8e17cee79c3070d1 Mon Sep 17 00:00:00 2001 From: Janis Date: Wed, 10 Dec 2025 22:21:00 +0100 Subject: [PATCH 1/3] feat: FRO-31 Assemble In Game Component --- knockoutwhistweb/app/util/WebsocketEventMapper.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/knockoutwhistweb/app/util/WebsocketEventMapper.scala b/knockoutwhistweb/app/util/WebsocketEventMapper.scala index 4e3bb32..522bd56 100644 --- a/knockoutwhistweb/app/util/WebsocketEventMapper.scala +++ b/knockoutwhistweb/app/util/WebsocketEventMapper.scala @@ -57,7 +57,8 @@ object WebsocketEventMapper { Json.obj( "id" -> ("request-" + java.util.UUID.randomUUID().toString), "event" -> obj.id, - "state" -> stateToJson(session), + "state" -> session.gameLobby.getLogic.getCurrentState.toString, + "stateData" -> stateToJson(session), "data" -> data ) } -- 2.52.0 From 7f768e8c653b899446a4199fa8a6854acd795ed4 Mon Sep 17 00:00:00 2001 From: Janis Date: Wed, 10 Dec 2025 22:21:28 +0100 Subject: [PATCH 2/3] feat: FRO-31 Assemble In Game Component --- knockoutwhistweb/app/controllers/StatusController.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/knockoutwhistweb/app/controllers/StatusController.scala b/knockoutwhistweb/app/controllers/StatusController.scala index 72daedb..134a1f0 100644 --- a/knockoutwhistweb/app/controllers/StatusController.scala +++ b/knockoutwhistweb/app/controllers/StatusController.scala @@ -34,7 +34,7 @@ class StatusController @Inject()( Json.obj( "status" -> "authenticated", "username" -> user.name, - "inGame" -> "false" + "inGame" -> false ) ) } else { @@ -43,7 +43,7 @@ class StatusController @Inject()( Json.obj( "status" -> "authenticated", "username" -> user.name, - "inGame" -> "true", + "inGame" -> true, "gameId" -> game.id ) ) -- 2.52.0 From b74d158b0563819f89732b139dc5874ef8b714e0 Mon Sep 17 00:00:00 2001 From: Janis Date: Thu, 11 Dec 2025 07:09:50 +0100 Subject: [PATCH 3/3] fix: Update session cookie reference to accessToken in StatusController --- knockoutwhistweb/app/controllers/StatusController.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knockoutwhistweb/app/controllers/StatusController.scala b/knockoutwhistweb/app/controllers/StatusController.scala index 134a1f0..e57f5a4 100644 --- a/knockoutwhistweb/app/controllers/StatusController.scala +++ b/knockoutwhistweb/app/controllers/StatusController.scala @@ -80,7 +80,7 @@ class StatusController @Inject()( }} private def getUserFromSession(request: RequestHeader): Option[User] = { - val session = request.cookies.get("sessionId") + val session = request.cookies.get("accessToken") if (session.isDefined) return sessionManager.getUserBySession(session.get.value) None -- 2.52.0