unreal4u / telegram-api

Complete async capable Telegram bot API implementation for PHP7
https://github.com/unreal4u/telegram-api/wiki
MIT License
784 stars 172 forks source link

Fixed return type for AnswerInlineQuery::getResults #123

Closed DJTommek closed 3 years ago

unreal4u commented 3 years ago

Hi and thanks for this PR! I believe that function returns an encoded json which is a string, but I'll be able to test this further on wednesday.

In the meantime I'll just merge. If everything is ok, a new release will be launched on.. you've guessed it: wednesday haha

DJTommek commented 3 years ago

Thanks 👍

According your source code in addResult() it's array of Result objects multi-dimensional arrays with various of objects as Logger, in my case reply_markup => Inline\Keyboard\Markup, input_message_content => InputMessageContent\Text etc. I'm using your getResult() method for checking, if there is at least one inline query answer look here and it works just fine. Otherwise I would need to maintain list of answers by myself.