Send notification on appointment update
This commit is contained in:
parent
c31ab1eb64
commit
8697c717b8
@ -501,8 +501,12 @@ async function runner() {
|
||||
}
|
||||
|
||||
if (apptDate != ctx.currentAppt.date || apptConsulate != ctx.currentAppt.consulate) {
|
||||
console.log(`New appointment date: ${apptDate} at ${apptConsulate},
|
||||
old: ${ctx.currentAppt.consulate} at ${ctx.currentAppt.date}`);
|
||||
msg = `New appointment date: ${apptDate} at ${apptConsulate}`
|
||||
if (ctx.currentAppt.date != null) {
|
||||
sendNotification(msg);
|
||||
}
|
||||
msg += `, was: ${ctx.currentAppt.consulate} at ${ctx.currentAppt.date}`
|
||||
console.log(msg);
|
||||
ctx.currentAppt = { consulate: apptConsulate, date: apptDate };
|
||||
await chrome.storage.local.set({ "ctx_currentAppt": ctx.currentAppt });
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user