Fix edge case when message object is undefined #37
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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! :)
@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 areedited_message
, etc. instead. (https://core.telegram.org/bots/api#getting-updates)anyways, I think your solution works! will publish a new version 👍
Published
telegram-api@0.9.1
Wow, that was a quick merge and publish! Once again, thanks a lot!