From 9f8cec0889c79d9ead6d077077634754761a8dc1 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 10 Jul 2021 00:02:41 +0200 Subject: Fix mail notifications when active goes from Both to specific. --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server.js') diff --git a/server.js b/server.js index 49a97d0..65aacae 100644 --- a/server.js +++ b/server.js @@ -1054,7 +1054,7 @@ function mail_your_turn_notification_to_offline_users(game_id, old_active, new_a let users = {}; let online = {}; for (let p of QUERY_PLAYERS_FULL.all(game_id)) { - if (p.notifications && !is_active(old_active, p.role) && is_active(new_active, p.role)) { + if (p.notifications && is_active(new_active, p.role)) { users[p.user_id] = p; if (is_online(game_id, p.user_id)) online[p.user_id] = 1; @@ -1065,7 +1065,7 @@ function mail_your_turn_notification_to_offline_users(game_id, old_active, new_a if (online[u]) reset_your_turn_notification(users[u], game_id); else - mail_your_turn_notification(users[u], game_id, '+1 minute'); + mail_your_turn_notification(users[u], game_id, '+0 seconds'); } } -- cgit v1.2.3