Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto update (bump) minor version #632

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

gabstv
Copy link
Contributor

@gabstv gabstv commented Nov 3, 2021

An attempt to avoid errors like #631
It's disabled by default to keep the original behaviour of this library:

whatsapp.AutoUpdate = true
// this will bump the minor version by 10 if the command "update" is received on login
whatsapp.AutoUpdateIncrement = 10
whatsapp.AutoUpdateMaxRetries = 100
whatsapp.AutoUpdateRetryDelay = time.Millisecond * 500

This PR also returns a proper error instead of the usual "JSON marshal failed" (check whatsapp.ErrUpdateRequired), so you can also act manually if this error is received.

DennisGHUA added a commit to DennisGHUA/go-whatsapp that referenced this pull request Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant