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(); }