From 77f54fb1b47fb085f7f62bc5ea1e14a3b531f8ee Mon Sep 17 00:00:00 2001 From: Matt Mullins Date: Sun, 24 Feb 2013 16:59:05 -0800 Subject: [PATCH] Send game ID to client for in-game chat --- src/net/socialgamer/cah/handlers/ChatHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net/socialgamer/cah/handlers/ChatHandler.java b/src/net/socialgamer/cah/handlers/ChatHandler.java index e77d754..8d67727 100644 --- a/src/net/socialgamer/cah/handlers/ChatHandler.java +++ b/src/net/socialgamer/cah/handlers/ChatHandler.java @@ -93,6 +93,7 @@ public class ChatHandler extends GameWithPlayerHandler { broadcastData.put(LongPollResponse.FROM, user.getNickname()); broadcastData.put(LongPollResponse.MESSAGE, message); broadcastData.put(LongPollResponse.FROM_ADMIN, user.isAdmin()); + broadcastData.put(LongPollResponse.GAME_ID, game.getId()); // TODO once there are multiple chat channels, put the destination here // TODO once there are games and they have their own chat, make it only send to participants game.broadcastToPlayers(MessageType.CHAT, broadcastData);