After I removed the whatsapp web session on the phone, the go-whatsapp became unusable.
I'm not a go developer, so I can understand the source, but the architecture I have no idea. Where is the session saved?
The library does not save the session anywhere, instead it is returned by the login and restoreSession function. If you use the code that is provided by the example section, the session is saved in os.TempDir() and is called _whatsappSession.gob_
Thank you! Yes, I was using the sample code. Now I'm trying to implement a detection of disconnected and terminated sections. The Whatsapp Web realizes the difference, but the examples provided do not.
Disconnected session

Closed session

If the session gets taken over by another client, you will get a disconnect message via the JsonHandler and the websocket get closed afterwards. The closing of the socket gets communicated via the HandleError function.
Most helpful comment
If the session gets taken over by another client, you will get a disconnect message via the JsonHandler and the websocket get closed afterwards. The closing of the socket gets communicated via the HandleError function.