Skip to content

Commit

Permalink
Always set lastSeen, not just when the game is over
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlkonig committed Oct 19, 2024
1 parent 34b2697 commit a696e1c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions api/abstractplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,11 +837,9 @@ async function game(userid: string, pars: { id: string, cbit: string | number, m
throw new Error(`Game ${pars.id}, metaGame ${pars.metaGame}, completed bit ${pars.cbit} not found`);
}
}
// If the game is over update user to indicate they have seen the game end.
let work;
if ((game.toMove === "" || game.toMove === null) && userid !== "") {
work = setSeenTime(userid, pars.id);
}
// Always set seen time, not just when the game is over
const work = setSeenTime(userid, pars.id);

// hide other player's simulataneous moves
const flags = gameinfo.get(game.metaGame).flags;
if (flags !== undefined && flags.includes('simultaneous') && game.partialMove !== undefined) {
Expand Down

0 comments on commit a696e1c

Please sign in to comment.