seven 6 napja
szülő
commit
59e18c49a6
1 módosított fájl, 11 hozzáadás és 0 törlés
  1. 11 0
      app/Http/Controllers/api/TelegramWebHook.php

+ 11 - 0
app/Http/Controllers/api/TelegramWebHook.php

@@ -534,6 +534,17 @@ class TelegramWebHook extends Controller
             ['投注大群']
         ];
 
+        if($replyInfo && $replyInfo->keyboard){
+            $keyboard = json_decode($replyInfo->keyboard, true);
+
+            foreach ($keyboard as $rowIndex => $row) {
+                foreach ($row as $buttonIndex => $button) {
+                    $keyboard[$rowIndex][$buttonIndex] = ['text' => $button->text];
+                }
+            }
+
+        }
+
         $botMsg = [];
         $botMsg['chat_id'] = $chatId;
         $replyMarkup = [