From a696e1cb02bf8a2946570ec85c6b7d7063168e7f Mon Sep 17 00:00:00 2001 From: Aaron Dalton Date: Sat, 19 Oct 2024 14:28:34 -0600 Subject: [PATCH] Always set lastSeen, not just when the game is over --- api/abstractplay.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/api/abstractplay.ts b/api/abstractplay.ts index 5593b31..6711ed2 100644 --- a/api/abstractplay.ts +++ b/api/abstractplay.ts @@ -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) {