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) {