)
) && (
!obj.drawOffer || !!(obj.drawOffer.match(/^[wbtn]$/))
+ ) && (
+ !obj.rematchOffer || !!(obj.rematchOffer.match(/^[wbn]$/))
) && (
!obj.fen || !!(obj.fen.match(/^[a-zA-Z0-9, /-]*$/))
) && (
let modifs = "";
// NOTE: if drawOffer is set, we should check that it's player's turn
// A bit overcomplicated. Let's trust the client on that for now...
- if (obj.drawOffer)
+ if (!!obj.drawOffer)
{
- if (obj.drawOffer == "n") //Special "None" update
+ if (obj.drawOffer == "n") //special "None" update
obj.drawOffer = "";
modifs += "drawOffer = '" + obj.drawOffer + "',";
}
+ if (!!obj.rematchOffer)
+ {
+ if (obj.rematchOffer == "n") //special "None" update
+ obj.rematchOffer = "";
+ modifs += "rematchOffer = '" + obj.rematchOffer + "',";
+ }
if (!!obj.fen)
modifs += "fen = '" + obj.fen + "',";
if (!!obj.score)