Commit e66eb190 authored by Armando Lüscher's avatar Armando Lüscher

Make sure the keyboard markup is passed as a string, not object.

parent ebae5739
...@@ -172,6 +172,11 @@ class Request ...@@ -172,6 +172,11 @@ class Request
$debug_handle = TelegramLog::getDebugLogTempStream(); $debug_handle = TelegramLog::getDebugLogTempStream();
try { try {
//Fix so that the keyboard markup is a string, not an object
if (isset($data['reply_markup']) && !is_string($data['reply_markup'])) {
$data['reply_markup'] = (string)$data['reply_markup'];
}
$response = self::$client->post( $response = self::$client->post(
'/bot' . self::$telegram->getApiKey() . '/' . $action, '/bot' . self::$telegram->getApiKey() . '/' . $action,
['debug' => $debug_handle, 'form_params' => $data] ['debug' => $debug_handle, 'form_params' => $data]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment