From 1f986816934b77c0ea48b5fb0404e03c738f5b79 Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Sat, 8 Jan 2022 00:26:01 +0100 Subject: [PATCH] Passing points to onMessage, fixes NaN points. --- src/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index c4054b5..e5a7c6b 100644 --- a/src/app.js +++ b/src/app.js @@ -182,7 +182,10 @@ function onMessage(message, bot, games) { ...game, bot, message, - user, + user: user && { + ...user, + points: points[game.key]?.[`${user.id}:${user.username}`] || 0, + }, room, logger, }));