Closed laurynas-karvelis closed 6 years ago
@laurynas-karvelis Thanks for the pull-request! I see, that makes sense, not all updates have a message
property, it is an optional property. Sometimes there are edited_message
, etc. instead. (https://core.telegram.org/bots/api#getting-updates)
anyways, I think your solution works! will publish a new version :+1:
Published telegram-api@0.9.1
Wow, that was a quick merge and publish! Once again, thanks a lot!
It appears when communicating with telegram bot rapidly, entire message object sometimes becomes undefined, hence forcing node.js to throw an underfined 'chat' property error.
This is a quick fix, although it fixes the symptom, I'm not entirely sure it fixes the cause of this error. Looking forward to your feedback.
Thank you for this awesome lib, BTW! :)