reo7sp / tgbot-cpp

C++ library for Telegram bot API
http://reo7sp.github.io/tgbot-cpp
MIT License
995 stars 238 forks source link

Avoid unnecessary casting of reply_markup in editMessageText #299

Closed paulusel closed 5 months ago

paulusel commented 5 months ago

These change should have been part of #298 PR. I didn't know there was separate method to parse InlineKeyboardMarkup. Upon closer look I noticed editMessageText was calling a generic method which does casting to determine exact keyboard type and then in turn calls another method for parsing the determined type.

Now that we are using inline keyboard specifically, all that is unnecessary. So this one line change bypasses that and its more appropriate.

Sorry for submitting incomplete PR. This should be complete now.

reo7sp commented 5 months ago

Thanks👍