Enhance reply_markup handling and add SendPaidMedia method.
This commit is contained in:
parent
b58943c7c2
commit
744771445e
8 changed files with 67 additions and 15 deletions
|
@ -60,9 +60,16 @@
|
|||
$parameters['reply_parameters'] = $parameters['reply_parameters']->toArray();
|
||||
}
|
||||
|
||||
if(isset($parameters['reply_markup']) && $parameters['reply_markup'] instanceof ObjectTypeInterface)
|
||||
if (isset($parameters['reply_markup']))
|
||||
{
|
||||
$parameters['reply_markup'] = $parameters['reply_markup']->toArray();
|
||||
if ($parameters['reply_markup'] instanceof ObjectTypeInterface)
|
||||
{
|
||||
$parameters['reply_markup'] = json_encode($parameters['reply_markup']->toArray());
|
||||
}
|
||||
elseif (is_array($parameters['reply_markup']))
|
||||
{
|
||||
$parameters['reply_markup'] = json_encode($parameters['reply_markup']);
|
||||
}
|
||||
}
|
||||
|
||||
return Message::fromArray(self::executeCurl(self::buildPost($bot, Methods::SEND_MESSAGE->value, $parameters)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue