From ace5abaae051e4acd02d3d58706fdfef45faae59 Mon Sep 17 00:00:00 2001 From: Saber Tabatabaee Yazdi Date: Mon, 6 Nov 2023 10:52:05 +0330 Subject: [PATCH] fix bug in send message to admin when too long --- app/Helpers/BotHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Helpers/BotHelper.php b/app/Helpers/BotHelper.php index 6a9da3e6..e20cd648 100644 --- a/app/Helpers/BotHelper.php +++ b/app/Helpers/BotHelper.php @@ -494,7 +494,7 @@ public static function sendMessageToUserAndAdmins(Telegram $bot, string $message { // BotHelper::sendMessage($bot, $message); BotHelper::sendLongMessage($message, $bot); - $message = strlen($message) > 4000 ? substr($message, 4000) : $message; + $message = strlen($message) > 4000 ? substr($message, 0, 4000) : $message; BotHelper::sendMessageToSuperAdmin($message . StringHelper::insertTextForAdmin($bot, $type), 'bale'); BotHelper::sendMessageToSuperAdmin($message . StringHelper::insertTextForAdmin($bot, $type), 'telegram'); }