Ken 1 週間 前
コミット
c6d86f0fcb
1 ファイル変更9 行追加9 行削除
  1. 9 9
      app/Services/BaseService.php

+ 9 - 9
app/Services/BaseService.php

@@ -224,7 +224,7 @@ class BaseService
             ];
             if ($index > 0) {
                 $res[] = $botMsg;
-//                self::telegram()->sendMessage($botMsg);
+                self::telegram()->sendMessage($botMsg);
             } else {
                 if (count($keyboard) > 0) {
                     $botMsg['reply_markup'] = json_encode(['inline_keyboard' => $keyboard]);
@@ -235,17 +235,17 @@ class BaseService
                     $botMsg['caption'] = $item;
                     $botMsg['protect_content'] = true;
                     $res[] = $botMsg;
-//                    $response = self::telegram()->sendPhoto($botMsg);
+                    $response = self::telegram()->sendPhoto($botMsg);
                 } else {
                     $res[] = $botMsg;
-//                    $response = self::telegram()->sendMessage($botMsg);
+                    $response = self::telegram()->sendMessage($botMsg);
+                }
+                if ($isTop === true) {
+                    self::telegram()->pinChatMessage([
+                        'chat_id' => "@{$bettingGroup}",
+                        'message_id' => $response->get('message_id')
+                    ]);
                 }
-//                if ($isTop === true) {
-//                    self::telegram()->pinChatMessage([
-//                        'chat_id' => "@{$bettingGroup}",
-//                        'message_id' => $response->get('message_id')
-//                    ]);
-//                }
             }