From 399530d2c913b3262db7ffaff3129a5dda3a1a8f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 19 Oct 2021 17:56:05 +0200 Subject: server: Skip reminder notifications if mailer is not loaded. --- server.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server.js') diff --git a/server.js b/server.js index 7ec15ba..cc81a18 100644 --- a/server.js +++ b/server.js @@ -1114,6 +1114,8 @@ function mail_your_turn_notification_to_offline_users(game_id, old_active, activ } function notify_your_turn_reminder() { + if (!mailer) + return; for (let item of QUERY_LIST_YOUR_TURN.all()) { if (!QUERY_IS_SOLO.get(item.game_id)) { mail_your_turn_notification(item, item.game_id, '+25 hours'); @@ -1122,6 +1124,8 @@ function notify_your_turn_reminder() { } function notify_ready_to_start_reminder() { + if (!mailer) + return; for (let game of QUERY_LIST_UNSTARTED_GAMES.all()) { let players = QUERY_PLAYERS.all(game.game_id); if (RULES[game.title_id].ready(game.scenario, players)) { -- cgit v1.2.3