akshettrj / watgbridge

A forwarder from WhatsApp to Telegram written in GoLang
MIT License
165 stars 40 forks source link

Notify on telegram side when whatsapp requires auth #23

Closed NicKoehler closed 1 year ago

NicKoehler commented 1 year ago

I installed this on a Raspberry Pi 4 and set up a service to run it. Sometimes, the application asks for the QR code again, but it's hard to notice since I wasn't checking the service, and I have no way to do so without connecting to the Raspberry Pi to check if the service is asking for the QR code.

Is it possible to add a notification on the Telegram side when WhatsApp isn't authenticated correctly to make it more noticeable?

Thanks in advance for your great job!

akshettrj commented 1 year ago

Yeah, it might be possible. I will look into it

Did you switch off your original WhatsApp device? Because I think WhatsApp wants the primary device to come online every few days

NicKoehler commented 1 year ago

Most likely what you said is correct because my WhatsApp is under advanced suspension. I don't want to use it, receive notifications from it, or have it drain my battery

akshettrj commented 1 year ago

It would make my task easier if you could answer some questions for me:

  1. Does the QR code reappear after the bot restarts (which happens automatically every 24 hours if you are using the provided systemd service file), or is the QR code emitted during a running instance as well?

  2. If it happens during a running instance, can you add some debugging statements in line 32 to check what events are emitted when this happens?

Maybe add fmt.Println(reflect.TypeOf(evt)) in line 32

NicKoehler commented 1 year ago

I don't know if is stopping after restarting or while running, how do I check this?

akshettrj commented 1 year ago

Is it printing the QR code when this happens, or some other error ?

NicKoehler commented 1 year ago

It just prints the qr code, no errors

NicKoehler commented 1 year ago

Thank you very much for this update!