filter blacklisted items before booking
This commit is contained in:
+2
-2
@@ -22,7 +22,7 @@ async function filterAlreadyBookedContacts(contactList) {
|
||||
}
|
||||
|
||||
async function filterBlacklistedContacts(contactList) {
|
||||
let blackListedContacts = await mongoManager.getAllBlackedListItems(collectionName);
|
||||
let blackListedContacts = await mongoManager.getAllBlackedListItems();
|
||||
let contactsToBook = [];
|
||||
contactList.forEach((contact) => {
|
||||
let blackListedItem = blackListedContacts.find((bookedContact) => bookedContact.email === contact.mail)
|
||||
@@ -130,7 +130,7 @@ async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathT
|
||||
return
|
||||
}
|
||||
let segmentNumber = listToBook.length / devices.length;
|
||||
console.log("connected device number:" + listToBook.length)
|
||||
console.log("connected device number:" + devices.length)
|
||||
console.log("segmentNumber:" + segmentNumber)
|
||||
for (let i = 0; i < devices.length; i++) {
|
||||
startWithList(listToBook.slice(i * segmentNumber, segmentNumber * (i + 1)), devices[i], selectedStore, audioAnalyse, alertBeep);
|
||||
|
||||
Reference in New Issue
Block a user