From 50dbe52377472c0a0862ebac670a3f64ad25a36c Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Wed, 18 Aug 2021 16:02:36 +0200 Subject: [PATCH] Set remindTime when first sending notification --- src/notification/repository.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/notification/repository.js b/src/notification/repository.js index 1d7cd13..eb3f4d7 100644 --- a/src/notification/repository.js +++ b/src/notification/repository.js @@ -53,7 +53,7 @@ class NotificationRepository latchTime: now, resetTime: null, reminders: true, - remindTime: null + remindTime: now }; await this._flush(); @@ -71,6 +71,8 @@ class NotificationRepository this.logger.info(`Latching notification with id ${id} and token '${token}', send permitted`); notification.latched = true; notification.latchTime = now; + notification.reminders = true; + notification.remindTime = now; await this._flush(); return token; @@ -100,8 +102,6 @@ class NotificationRepository this.logger.info(`Resetting notification with id '${notification.id}' and token '${token}'`); notification.latched = false; notification.resetTime = now; - notification.reminders = true; - notification.remindTime = null; await this._flush(); }