From: Anderson A. Giacomolli Date: Sun, 8 Nov 2026 21:38:18 +0000 (-0300) Subject: Give the WhatsApp batches their own type X-Git-Url: https://git.giacomolli.uk/onechat/commitdiff_plain/a6a82d96b4906e9e1f09f45f69f48124f11ae1bb?ds=sidebyside;hp=a6a82d96b4906e9e1f09f45f69f48124f11ae1bb Give the WhatsApp batches their own type WhatsAppInbox in whatsapp_inbox.go puts the incoming text messages into batches, logs the closed batches, and holds the catch-up after each connection. It owns the wake and failures channels of Run, the limit of the catch-up, and, under its own mutex, the state of the catch-up and its timer. The conversion of an event to a batch message goes with it. WhatsApp keeps the session and the connection. Its event handler gives each message to the inbox with a WhatsAppLink, and starts and ends the catch-up there. The state file stays a field of WhatsApp too, because it also holds the send records, and it has a mutex of its own. The tests of the batches and the catch-up move to whatsapp_inbox_test.go, and the helpers that more test files use move to whatsapp_fake_helper_test.go. The behavior does not change. Issue: 6f69ca1 ---