X-Git-Url: https://git.auder.net/assets/icon_infos.svg?a=blobdiff_plain;f=server%2Fmodels%2FGame.js;h=516c4bc52982b2c3a4237777772a23ee445160d2;hb=b49527c46ed89115a253f2965e198d06c9a26e9a;hp=ee381d4227329100712470bcb46f2b5fab3a934f;hpb=1ef65040168ab7d55ce921abc9d63644a937d689;p=vchess.git diff --git a/server/models/Game.js b/server/models/Game.js index ee381d42..516c4bc5 100644 --- a/server/models/Game.js +++ b/server/models/Game.js @@ -313,7 +313,7 @@ const GameModel = ) && ( !obj.score || !!(obj.score.match(/^[012?*\/-]+$/)) ) && ( - !obj.chatRead || !(['w','b'].includes(obj.chatRead)) + !obj.chatRead || ['w','b'].includes(obj.chatRead) ) && ( !obj.scoreMsg || !!(obj.scoreMsg.match(/^[a-zA-Z ]+$/)) ) && ( @@ -483,6 +483,7 @@ const GameModel = ) || ( + !!movesGroups[g.id] && movesGroups[g.id].nbMoves == 1 && tsNow - movesGroups[g.id].lastMaj > 14*day )