diff --git a/app/Helpers/StringHelper.php b/app/Helpers/StringHelper.php index 90703a8b..b72d6794 100644 --- a/app/Helpers/StringHelper.php +++ b/app/Helpers/StringHelper.php @@ -152,7 +152,7 @@ public static function generateDetailHadithMessage($academyOfIslamDataItem): str $botType = Config::get('config.bot.type', 'bale'); //bottype - $isLong = Str::length(strip_tags($arabic)) > 1000; + $isLong = Str::length(strip_tags($arabic)) > 100; if ($id2) { self::saveLongTextToDB($academyOfIslamDataItem); @@ -311,8 +311,8 @@ public static function getStringHadith($book, $number, $part, $chapter, $arabic, ' . trans("hadith.result.book: ") . strip_tags($book) . ' ' . trans("hadith.result.part: ") . strip_tags($part) . ' ' . trans("hadith.result.chapter: ") . strip_tags($chapter) . ' -' . trans("hadith.result.arabic text: ") . ($isLong ? (substr($arabic, 0, 1000) . "...") : strip_tags($arabic)) . (App::getLocale() != 'fa' ? ' -' . trans("hadith.result.english text: ") . substr($english, 0, 100) . '...' : "") . ' +' . trans("hadith.result.arabic text: ") . ($isLong ? (substr(strip_tags($arabic), 0, 1500) . "...") : strip_tags($arabic)) . (App::getLocale() ? ' +' . trans("hadith.result.english text: ") . substr(strip_tags($english), 0, 1000) . '...' : "") . ' ' . trans("hadith.result.id: ") . $id2; } diff --git a/app/Http/Controllers/HadithSearchController.php b/app/Http/Controllers/HadithSearchController.php index da7cf979..06829845 100644 --- a/app/Http/Controllers/HadithSearchController.php +++ b/app/Http/Controllers/HadithSearchController.php @@ -76,7 +76,7 @@ public function index(BotRequest $request) $id2 = substr($bot->Text(), 5); $hadith = BotHadithItem::query()->where("id2", $id2)->first(); if ($hadith) - BotHelper::sendMessage($bot, $this->getHadith($hadith)); + BotHelper::sendLongMessage($bot, $this->getHadith($hadith)); else BotHelper::sendMessage($bot, trans("bot.not found")); } else {