Set remindTime when first sending notification

This commit is contained in:
Mark van Renswoude 2021-08-18 16:02:36 +02:00
parent fef6b29509
commit 50dbe52377

View File

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