From: Anderson A. Giacomolli Date: Sun, 8 Nov 2026 15:03:17 +0000 (-0300) Subject: Wait for the WhatsApp catch-up before a turn X-Git-Url: https://git.giacomolli.uk/onechat/commitdiff_plain/0da1ef837bbd190cc5787214187d1b29d62b9410?ds=sidebyside;hp=0da1ef837bbd190cc5787214187d1b29d62b9410 Wait for the WhatsApp catch-up before a turn After each connection, the WhatsApp servers send the messages that came while the daemon was away, and then the event OfflineSyncCompleted. Until that event, or one minute at the most, the daemon keeps the closed batches in the state file and logs none. At the end it closes all batches, logs them in order, and wakes the turn loop once with the batches that need the user, so the whole catch-up gives one turn and not one turn for each chat. The batches that the state file holds at the start wait for the first catch-up in the same way. TurnLoop.Work now only logs and notifies, and the new TurnLoop.Wake adds several logged messages to the waiting messages at once. A report of a subagent uses both, and the WhatsApp batches of one delivery join one turn through one Wake. Issue: 6f69ca1 ---