diff --git a/index.php b/index.php index 0d65840..96893b9 100644 --- a/index.php +++ b/index.php @@ -53,7 +53,7 @@ foreach ($receivers as $receiver) { touch('last_notification_date.txt'); } $lastNotificationDate = file_get_contents('last_notification_date.txt'); - if ($packageInfo['current_quantity'] > -1 && $lastNotificationDate !== date('Y-m-d')) { + if ($packageInfo['current_quantity'] > 0 && $lastNotificationDate !== date('Y-m-d')) { send_notifications($client, $receiver, 'Dostępna paczka w 3 kromki chleba', sprintf('W trzech kromkach dostępne są paczki. Ilość: %s', $packageInfo['current_quantity'])); $notificationSent = true; }