From 499e14de45d07138fc6390ccd340afdcc4d495b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20P=C5=82aczek?= Date: Sun, 10 Nov 2024 17:58:21 +0100 Subject: [PATCH] Update quantity --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }