Skip to content

Commit

Permalink
Merge pull request #37 from dimaodnokoz/master
Browse files Browse the repository at this point in the history
Bugfix in proceedConfiguredStep function in dialog.php: json_encode of reply_markup added
  • Loading branch information
alies-dev authored Nov 27, 2024
2 parents 0efd47f + bd658b5 commit 73d3c52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Dialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ private function proceedConfiguredStep(array $stepConfig, Update $update, int $c

if (is_array($stepConfig['options'] ?? null)) {
$params = [...$params, ...$stepConfig['options']];

if (is_array($params['reply_markup'] ?? null) && [] != $params['reply_markup']) {
$params['reply_markup'] = json_encode($params['reply_markup']);
} else{
unset($params['reply_markup']);
}
}

$this->bot->sendMessage($params);
Expand Down

0 comments on commit 73d3c52

Please sign in to comment.