Closed varemel closed 7 months ago
Hi,
When trying to restore keyboard from array switch_inline_query & switch_inline_query_current_chat properties are missing. Suggest to add this to Keyboard::fromArray() method https://github.com/defstudio/telegraph/blob/722d94f83790fef66bb940b57f7b7e9f255d2acc/src/Keyboard/Keyboard.php#L60
switch_inline_query
switch_inline_query_current_chat
if (array_key_exists('switch_inline_query', $button)) { $rowButton = $rowButton->switchInlineQuery($button['switch_inline_query']); } if (array_key_exists('switch_inline_query_current_chat', $button)) { $rowButton = $rowButton->switchInlineQuery($button['switch_inline_query_current_chat'])->currentChat(); }
Hi @varemel, thanks for your suggestion!
Feel free to open a PR for this
Hi @fabio-ivona I created PR. I don't think there is a need to add test for this. Is it ok?
Thanks!
Hi,
When trying to restore keyboard from array
switch_inline_query
&switch_inline_query_current_chat
properties are missing. Suggest to add this to Keyboard::fromArray() method https://github.com/defstudio/telegraph/blob/722d94f83790fef66bb940b57f7b7e9f255d2acc/src/Keyboard/Keyboard.php#L60