diff --git a/server/routes/games.js b/server/routes/games.js index 75c92b2..4633025 100755 --- a/server/routes/games.js +++ b/server/routes/games.js @@ -2363,8 +2363,7 @@ const playCard = (game, session, card) => { } }); if (points < getVictoryPointRule(game)) { - return `You can not play victory point cards until you can reach ` - `${getVictoryPointRule(game) }!`; + return `You can not play victory point cards until you can reach ${getVictoryPointRule(game)}!`; } addChatMessage(game, session, `${name} played a Victory Point card.`); } @@ -4109,7 +4108,11 @@ router.ws("/ws/:id", async (ws, req) => { break; case 'chat': - console.log(`${short}:${id} - ${data.type} - ${data.message}`) + /* If the chat message is empty, do not add it to the chat */ + if (data.message.trim() == '') { + break; + } + console.log(`${short}:${id} - ${data.type} - "${data.message}"`) addChatMessage(game, session, `${session.name}: ${data.message}`, true); parseChatCommands(game, data.message); sendUpdateToPlayers(game, { chat: game.chat });