Ken 1 hafta önce
ebeveyn
işleme
3ede0a495f
1 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. 5 3
      app/Services/BaseService.php

+ 5 - 3
app/Services/BaseService.php

@@ -216,21 +216,23 @@ class BaseService
             }
         }
 
-
+        unset($item);
         $item = $texts[0];
         $botMsg = [
             'chat_id' => "@{$bettingGroup}",
-            'protect_content' => true,
+            'text' => $item,
         ];
         if (count($keyboard) > 0) {
             $botMsg['reply_markup'] = json_encode(['inline_keyboard' => $keyboard]);
         }
         if (!empty($image)) {
+            unset($botMsg['text']);
             $botMsg['photo'] = InputFile::create($image);
             $botMsg['caption'] = $item;
+            $botMsg['protect_content'] = true;
             $response = self::telegram()->sendPhoto($botMsg);
         } else {
-            $botMsg['text'] = $item;
+
             $response = self::telegram()->sendMessage($botMsg);
         }
         if ($isTop) {