Ken před 1 týdnem
rodič
revize
28e2bc28e9
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      app/Services/BaseService.php

+ 3 - 1
app/Services/BaseService.php

@@ -208,13 +208,14 @@ class BaseService
             $botMsg = [
                 'chat_id' => "@{$bettingGroup}",
                 'text' => $item,
-                'index'=>$index
+                'index' => $index
             ];
 
             if ($index == 0 && count($keyboard) > 0) {
                 $botMsg['reply_markup'] = json_encode(['inline_keyboard' => $keyboard]);
             }
             if ($index == 0 && !empty($image)) {
+                unset($botMsg['text']);
 //                $botMsg['photo'] = InputFile::create($image);
                 $botMsg['photo'] = $image;
                 $botMsg['caption'] = $item;
@@ -257,6 +258,7 @@ class BaseService
                 $botMsg['reply_markup'] = json_encode(['inline_keyboard' => $keyboard]);
             }
             if ($index == 0 && !empty($image)) {
+                unset($botMsg['text']);
                 $botMsg['photo'] = InputFile::create($image);
                 $botMsg['caption'] = $item;
                 $botMsg['protect_content'] = true;  // 防止转发