DJTommek / better-location

Telegram bot for parsing and generating various of location formats.
https://t.me/BetterLocationBot
MIT License
8 stars 2 forks source link

Notices if using add to favourites on message created inline #31

Closed DJTommek closed 4 years ago

DJTommek commented 4 years ago

Notices if using add to favourites on message created via inline (@BetterLocationBot some location):

Notice: Trying to get property 'chat' of non-object in /src/libs/TelegramCustomWrapper/TelegramHelper.php:127
Notice: Trying to get property 'id' of non-object in /src/libs/TelegramCustomWrapper/TelegramHelper.php:127

Buttons are currently handled as in classic chat so expected to have more info. Inline buttons have only limited info about message, full example:

update_id => 123456789
callback_query => 
    id => "123456789123456789"
    from => 
        id => 148953285
        is_bot => false
        first_name => "DJTommek"
        last_name => "[Tomas Palider]"
        username => "DJTommek"
        language_code => "en"
    inline_message_id => "ABCDABCDABCDA_1A2B3C4D5e6f7"
    chat_instance => "1234567891234567891"
    data => "/favourites add 50.533921 16.158179"
DJTommek commented 4 years ago

Fixed in 142e94d7faa90d7abf99bd38b5cd10e23f61ed43.