summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-10 00:02:41 +0200
committerTor Andersson <tor@ccxvii.net>2021-07-10 00:03:20 +0200
commit9f8cec0889c79d9ead6d077077634754761a8dc1 (patch)
treea021774c126ce7bffd7a4bfedf9fe13283a5be7a /server.js
parent3cdbf22caefe5c8bff07b01abb8b70c4ff6b2bb1 (diff)
downloadserver-9f8cec0889c79d9ead6d077077634754761a8dc1.tar.gz
Fix mail notifications when active goes from Both to specific.
Diffstat (limited to 'server.js')
-rw-r--r--server.js4
1 files changed, 2 insertions, 2 deletions
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');
}
}