Ken hace 2 meses
padre
commit
668f2859d7
Se han modificado 1 ficheros con 7 adiciones y 4 borrados
  1. 7 4
      app/Http/Controllers/api/TelegramWebHook.php

+ 7 - 4
app/Http/Controllers/api/TelegramWebHook.php

@@ -111,15 +111,18 @@ class TelegramWebHook extends Controller
                     $type = preg_replace('/^topup@@/', '', $data);
                     $type = preg_replace('/^topup@@/', '', $data);
                     $topService = new TopUpService();
                     $topService = new TopUpService();
                     $res = $topService->scan($chatId, $messageId);
                     $res = $topService->scan($chatId, $messageId);
+
+
+                    $telegram->deleteMessage([
+                        'chat_id' => $chatId,
+                        'message_id' => $messageId,
+                    ]);
                     $telegram->sendPhoto($res);
                     $telegram->sendPhoto($res);
                 }
                 }
 
 
                 //点击充值按钮
                 //点击充值按钮
                 if ($data === 'topup@@topup') {
                 if ($data === 'topup@@topup') {
-//                    $telegram->deleteMessage([
-//                        'chat_id' => $chatId,
-//                        'message_id' => $messageId,
-//                    ]);
+
                     $res = TopUpService::chooseAddress($chatId, $messageId);
                     $res = TopUpService::chooseAddress($chatId, $messageId);
                     $telegram->editMessageText($res);
                     $telegram->editMessageText($res);
                 }
                 }