seven 5 روز پیش
والد
کامیت
cfd868e8c2
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      app/Http/Controllers/api/TelegramWebHook.php

+ 2 - 1
app/Http/Controllers/api/TelegramWebHook.php

@@ -535,12 +535,13 @@ class TelegramWebHook extends Controller
         ];
 
         if($replyInfo && $replyInfo->buttons){
+            $keyboard = [];
             $buttons = json_decode($replyInfo->buttons, true);
 
             foreach ($buttons as $rowIndex => $row) {
                 if(!empty($row)){
                     foreach ($row as $buttonIndex => $button) {
-                        $keyboard[$rowIndex][$buttonIndex] = ['text' => $button->text];
+                        $keyboard[$rowIndex][$buttonIndex] = $button->text;
                     }
                 }