seven 6 天之前
父節點
當前提交
dc7abebef3
共有 1 個文件被更改,包括 3 次插入0 次删除
  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) {