Ken 3 days ago
parent
commit
4b0ddc5e78
2 changed files with 7 additions and 1 deletions
  1. 5 1
      app/Services/BaseService.php
  2. 2 0
      app/Services/BetService.php

+ 5 - 1
app/Services/BaseService.php

@@ -271,10 +271,14 @@ class BaseService
                         $botMsg['photo'] = InputFile::create($image);
                         $botMsg['caption'] = $item;
                         $botMsg['protect_content'] = true;
+
                         $res[] = $botMsg;
                         $response = self::telegram()->sendPhoto($botMsg);
                     } else {
-                        $res[] = $botMsg;
+                        if (str_contains($botMsg['text'], '</pre>')){
+                            $botMsg['parse_mode'] = 'HTML';
+                        }
+                            $res[] = $botMsg;
                         $response = self::telegram()->sendMessage($botMsg);
                     }
                     if ($isTop === true) {

+ 2 - 0
app/Services/BetService.php

@@ -1063,9 +1063,11 @@ class BetService extends BaseService
         if ($keywordsList) {
             uksort($keywordsList, 'custom_sort');
 //            ksort($keywordsList);
+            $text3.="<pre>";
             foreach ($keywordsList as $k => $v) {
                 $text3 .= "{$k}    {$v} \n";
             }
+            $text3.="</pre>";
         }
 
         $inlineButton = self::getOperateButton();