Fix small since bug

This commit is contained in:
Zach Fox 2018-09-18 12:38:33 -07:00
parent 93191778dd
commit 04b44d0594

View file

@ -165,9 +165,10 @@ function AppUi(properties) {
if (that.notificationPollCaresAboutSince) {
var settingsKey = "notifications/" + that.buttonName + "/lastSince";
var timestamp = Settings.getValue(settingsKey, new Date().getTime());
url = url + "&since=" + timestamp;
Settings.setValue(settingsKey, timestamp);
var currentTimestamp = new Date().getTime();
var settingsTimestamp = Settings.getValue(settingsKey, currentTimestamp);
url = url + "&since=" + settingsTimestamp;
Settings.setValue(settingsKey, currentTimestamp);
}
console.debug(that.buttonName, 'polling for notifications at endpoint', url);