diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-10-19 17:56:05 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-10-22 22:43:15 +0200 |
commit | 399530d2c913b3262db7ffaff3129a5dda3a1a8f (patch) | |
tree | f231ba599d1f2a550e05d065509b06e0b1eb921e /server.js | |
parent | 36f1551b3359abc776596c6ac0e60ac10040a3de (diff) | |
download | server-399530d2c913b3262db7ffaff3129a5dda3a1a8f.tar.gz |
server: Skip reminder notifications if mailer is not loaded.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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)) { |