windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
262 stars 116 forks source link

Cannot read property 'chat' of undefined #175

Closed padaVVan closed 3 years ago

padaVVan commented 3 years ago

Error while processing the following events:

Update has no chat property.

pre_checkout_query update example.

{
  "update_id": 1231231231123,
  "pre_checkout_query": {
    "id": "111111212312312312312",
    "from": {
      "id": 111111111,
      "is_bot": false,
      "first_name": "XXXX",
      "last_name": "XXXX",
      "username": "XXXX",
      "language_code": "XXXX"
    },
    "currency": "EUR",
    "total_amount": 123,
    "invoice_payload": "secret token"
  }
}

Thank you.

windkh commented 3 years ago

Thanks for reporting. Came the message from a channel, groupchat or a direct one? Can you post the message of the other two events, too? I will fix this immediately. Would be fine if you could test that

windkh commented 3 years ago

Version 9.3.0 should fix it. Please test this version and tell me if it is working now.

sanyafifa commented 3 years ago

chatId: undefined - аfter upgrading to 9.3.1 I get this error :(

chatId: undefined
messageId: 154202
type: "editMessageReplyMarkup"
content: object
callbackQueryId: "3263562311586735500"
from: object
id: XXXXXXx
is_bot: false
first_name: "X"
last_name: "X"
language_code: "ru"
options: object
windkh commented 3 years ago

@sanyafifa what version did you have before? And what kind of event did you handle? From a channel or group?

windkh commented 3 years ago

@sanyafifa version 9.4.0 should fix this

sanyafifa commented 3 years ago

@sanyafifa what version did you have before? And what kind of event did you handle? From a channel or group?

ver 9.2.x inline keyboard does not work in chat with bot and group

windkh commented 3 years ago

@sanyafifa please test 9.4.0

sanyafifa commented 3 years ago

Node Red palette update available yet

sanyafifa commented 3 years ago

Works! Thank you