dedup game end event in bot/board API - closes #61

ignore the move event if the game is finished,
because we also get a FinishGame event then.
pull/7292/head^2
Thibault Duplessis 2020-09-24 13:17:02 +02:00
parent 63a9680ed2
commit d9a8f7a51b
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ final class GameStateStream(
}
def receive = {
case MoveGameEvent(g, _, _) if g.id == id => pushState(g)
case MoveGameEvent(g, _, _) if g.id == id && !g.finished => pushState(g)
case lila.chat.actorApi.ChatLine(chatId, UserLine(username, _, text, false, false)) =>
pushChatLine(username, text, chatId.value.lengthIs == Game.gameIdSize)
case FinishGame(g, _, _) if g.id == id => onGameOver(g.some)