do not send notifications when listings have been filtered

This commit is contained in:
orangecoding
2021-07-05 12:01:14 +02:00
parent b65c5d1a0c
commit 8d93581dfc

View File

@@ -106,6 +106,9 @@ class FredyRuntime {
}
_notify(newListings) {
if (newListings.length === 0) {
throw new NoNewListingsWarning();
}
const sendNotifications = notify.send(this._providerId, newListings, this._notificationConfig, this._jobKey);
return Promise.all(sendNotifications).then(() => newListings);
}