X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=411407f6e6e515a1097404d7f6a18d049866c0f9;hb=50bd11841587246cbedecf19097cfe5c4e5e163c;hp=ee8d53e5a54f59c06ff97aa6ac738d7515eee25e;hpb=751d7ca49079f479d41ee201e9cfbeee35664c41;p=vchess.git diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index ee8d53e5..411407f6 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -820,9 +820,12 @@ export default { // Ignore games where I play (will go in MyGames page), // and also games that I already received. if ( - game.players.every(p => - p.sid != this.st.user.sid && p.id != this.st.user.id) && - this.games.findIndex(g => g.id == game.id) == -1 + game.players.every(p => { + return ( + p.sid != this.st.user.sid && + (p.id == 0 || p.id != this.st.user.id) + ); + }) && this.games.findIndex(g => g.id == game.id) == -1 ) { let newGame = game; newGame.type = this.classifyObject(game); @@ -1014,7 +1017,11 @@ export default { let chall = Object.assign({}, this.newchallenge); // Add only if not already issued (not counting target or FEN): if (this.challenges.some(c => - (c.from.sid == this.st.user.sid || c.from.id == this.st.user.id) && + ( + c.from.sid == this.st.user.sid || + (c.from.id > 0 && c.from.id == this.st.user.id) + ) + && c.vid == chall.vid && c.cadence == chall.cadence && c.randomness == chall.randomness @@ -1036,7 +1043,10 @@ export default { const c = this.challenges[i]; if ( c.type == ctype && - (c.from.sid == this.st.user.sid || c.from.id == this.st.user.id) + ( + c.from.sid == this.st.user.sid || + (c.from.id > 0 && c.from.id == this.st.user.id) + ) ) { countMyChalls++; if (c.added < oldestAdded) {