CaliforniaMountainSnake / longmantelegrambot-inlinecalendar

This is the calendar in form of inline keyboard.
MIT License
0 stars 0 forks source link

InlineCalendar::selectDate() method logic error #2

Open ashkart opened 4 years ago

ashkart commented 4 years ago

line 53 $text = $_user_message->getText(true) ?? '';

the $_user_message variable is Longman\TelegramBot\Entities\Message wich never contain callback data given by calendar buttons. So I never chose the day of month or shift next/previous month because inline buttons data will never be checked. Just calendar rerender on every click. You may be should check $this->getCallbackQuery()->getData(). And it would be perfect to have some REAL examples in documentation, not just screenshot with non-working old code sample.