Closed Valdenirmezadri closed 3 years ago
I've been debugging for three days, it was just opening the issue that I believe solved the problem
change 5 to 60 on start: whatsapp.NewConn(60 * time.Second)
Saving the Session again on db: newSession, err := w.conn.RestoreWithSession(*session) newSesson to save...
And then in the library I commented on these lines: We need to create a PR for this change
Now I can log in to whatsapp, and the lib is working, sending and receiving messages even with the phone with the screen off and whatsapp closed
actually, as long as you haven't signed out, the libs stay connected (wac.IsConnected ())
If you receive the 'asleep' (handlejsonmessage) notification, you will not be able to receive messages until the mobile application is active. and this lib takes care of that very well, messages directly coming in upon awakening from sleep
always use the latest sessions. and it can continue to be used, until you sign out of the mobile device.
Good morning!
I've done several tests and I can't figure out why, WhatsApp web works well with WhatsApp closed and the mobile screen off, but this lib does not. I can't figure out why.
After a few minutes with the screen off, the lib stops receiving and sending messages, working again if I turn on the screen. When you are going to restore the session for the first time it does not connect, but whatsapp web can
Did anyone manage to resovler this problem, or managed to find out how WhatsApp Web does not have this problem?