Send notification on autobook

This commit is contained in:
Maks Snegov 2024-04-24 17:01:31 -07:00
parent 20b3a15a99
commit 923dd7495b

View File

@ -476,11 +476,14 @@ async function runner() {
msg = `Found better appointment in ${consulate} at ${chosenDate} ${chosenTime}`;
console.log(msg);
await sendNotification(msg);
if (config.consulates[consulate].autobook) {
if (!config.consulates[consulate].autobook) {
await sendNotification(msg);
} else {
await delay(PAGE_WAIT_TIME);
console.log('Auto booking');
msg = `Auto booking in ${consulate} at ${chosenDate} ${chosenTime}`;
console.log(msg);
await sendNotification(msg);
document.querySelector(".reveal-overlay:last-child [data-reveal] .button.alert").click();
}
} // end consulates loop