]> git.giacomolli.uk - onechat/commit
Log each change of the WhatsApp connection
authorAnderson A. Giacomolli <redacted>
Mon, 9 Nov 2026 13:23:55 +0000 (10:23 -0300)
committerAnderson A. Giacomolli <redacted>
Mon, 9 Nov 2026 13:23:55 +0000 (10:23 -0300)
commit8d9547f6e7ffa1e95ad25d9f8f2e7cfd23d992d0
tree36b3a48dc22d142ca95d57b81dff6259432a7ad5
parent75b9579355e1adcdbb1255a7e8e4582e0a431f3d
Log each change of the WhatsApp connection

The WhatsApp log gets one line for each change of the connection of the
linked device: connected, a failed first connection, a lost connection,
connected again with the length of the outage, a connection that does
not come back by itself, a link, an unlink, and a logout from the phone.
The retries of the library between them log nothing, and the logger of
the library stays off.

Each line says first what happens to the WhatsApp messages, and then the
cause. An unlink clears the time of the last disconnection, so the first
connection of a new link does not count as the end of an outage.

Issue: e4acfcb
whatsapp.go
whatsapp_groups.go
whatsapp_test.go