Send game ID to client for in-game chat
This commit is contained in:
parent
9cbd699109
commit
77f54fb1b4
|
@ -93,6 +93,7 @@ public class ChatHandler extends GameWithPlayerHandler {
|
||||||
broadcastData.put(LongPollResponse.FROM, user.getNickname());
|
broadcastData.put(LongPollResponse.FROM, user.getNickname());
|
||||||
broadcastData.put(LongPollResponse.MESSAGE, message);
|
broadcastData.put(LongPollResponse.MESSAGE, message);
|
||||||
broadcastData.put(LongPollResponse.FROM_ADMIN, user.isAdmin());
|
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 multiple chat channels, put the destination here
|
||||||
// TODO once there are games and they have their own chat, make it only send to participants
|
// TODO once there are games and they have their own chat, make it only send to participants
|
||||||
game.broadcastToPlayers(MessageType.CHAT, broadcastData);
|
game.broadcastToPlayers(MessageType.CHAT, broadcastData);
|
||||||
|
|
Loading…
Reference in New Issue