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.
An attempt to avoid errors like #631 It's disabled by default to keep the original behaviour of this library:
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.