From: Aleksey Filippov Date: Fri, 4 Jul 2025 16:57:12 +0000 (+0300) Subject: [BC-278] Отправка сообщения в Телеграм X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=ec2edc54337fc7a4e4ca412b41e3d602e0a0fa8d;p=erp24_rep%2Fyii-erp24%2F.git [BC-278] Отправка сообщения в Телеграм --- diff --git a/erp24/commands/CronController.php b/erp24/commands/CronController.php index 3d6ee9f5..202ffea3 100644 --- a/erp24/commands/CronController.php +++ b/erp24/commands/CronController.php @@ -708,12 +708,12 @@ class CronController extends Controller ); if (!empty($toSend)) { - foreach ($toSend as $telegramUser) { + foreach ($toSend as $key => $telegramUser) { $messageData = []; $messageData['chat_id'] = $telegramUser['chat_id']; $messageData['phone'] = $telegramUser['phone']; $this->stdout( - "Рассылка телеграма {$toSend[0]['chat_id']} . 1 \n", + "Рассылка телеграма {$toSend[$key]['chat_id']} . 1 \n", BaseConsole::FG_GREEN ); @@ -722,7 +722,7 @@ class CronController extends Controller ])); $this->stdout( - "Рассылка телеграма {$toSend[0]['chat_id']} . 2\n", + "Рассылка телеграма {$toSend[$key]['chat_id']} . 2\n", BaseConsole::FG_GREEN );