Fix by RobertGnz for too long messages and new function deleteMessage #348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix by RobertGnz:
"If deserializeJson happen to endup with an error for instance update too big for the buffer, then last_message_received will not be updated. Subsequent calls to getUpdates uses last_message_received + 1 for the offset value. But as last_message_received was not updated we will allways read the same message. Here we try to find the update_id and store it to update last_message_received if necessary."
See: #275 and #266
Created deleteMessage as a new function. This is the deleteMessage from another PR, I considered it better than mine, so I replaced it.
Added the deleteMessage in README.md, but missing is an example yet.
I hope this PR is a better one than my first, where I commented in german and changed the README.md to tell it is a fork 😏
frank
EDIT: Oh, I noticed that I forgot to put back the "Help support what I do!" part in the README.md with the sponsor beg.
If this PR is near to get pulled, I could (force) add it again, just leave a comment here @witnessmenow Thanks.