Ken hai 1 semana
pai
achega
a5943f8ff4
Modificáronse 1 ficheiros con 11 adicións e 9 borrados
  1. 11 9
      app/Services/BaseService.php

+ 11 - 9
app/Services/BaseService.php

@@ -215,8 +215,8 @@ class BaseService
                 $texts[] = $item;
             }
         }
-        return $texts;
 
+$res = [];
         foreach ($texts as $index => $item) {
             $botMsg = [
                 'chat_id' => "@{$bettingGroup}",
@@ -233,16 +233,18 @@ class BaseService
                     $botMsg['photo'] = InputFile::create($image);
                     $botMsg['caption'] = $item;
                     $botMsg['protect_content'] = true;
-                    $response = self::telegram()->sendPhoto($botMsg);
+                    $res[] = $botMsg;
+//                    $response = self::telegram()->sendPhoto($botMsg);
                 } else {
-                    $response = self::telegram()->sendMessage($botMsg);
-                }
-                if ($isTop === true) {
-                    self::telegram()->pinChatMessage([
-                        'chat_id' => "@{$bettingGroup}",
-                        'message_id' => $response->get('message_id')
-                    ]);
+                    $res[] = $botMsg;
+//                    $response = self::telegram()->sendMessage($botMsg);
                 }
+//                if ($isTop === true) {
+//                    self::telegram()->pinChatMessage([
+//                        'chat_id' => "@{$bettingGroup}",
+//                        'message_id' => $response->get('message_id')
+//                    ]);
+//                }
             }