seven 6 dias atrás
pai
commit
dc7abebef3
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      app/Services/BaseService.php

+ 3 - 0
app/Services/BaseService.php

@@ -230,6 +230,9 @@ class BaseService
             $botMsg['photo'] = InputFile::create($image);
             $botMsg['caption'] = $text;
             $botMsg['protect_content'] = true;  // 防止转发
+            if (count($keyboard) > 0) {
+                $botMsg['reply_markup'] = json_encode(['inline_keyboard' => $keyboard]);
+            }
             $response = self::telegram()->sendPhoto($botMsg);
         } else {
             foreach ($array as $key => $line) {