]> git.giacomolli.uk - onechat/commit
Convert WhatsApp events with pure functions
authorAnderson A. Giacomolli <redacted>
Sun, 8 Nov 2026 21:32:21 +0000 (18:32 -0300)
committerAnderson A. Giacomolli <redacted>
Sun, 8 Nov 2026 21:32:27 +0000 (18:32 -0300)
commit0b97bb2cc4bc0b8f8fe27cc7aa3f9d1d89ed28c8
treefcc2626cfc9244c1b9493ccedc1ca4862abcf56a
parenta85d214071706753f358f0af23cfd525c28dbfe0
Convert WhatsApp events with pure functions

The conversion of a message event to a batch message and the removal of
the own IDs from a text are now the functions whatsappMessage,
whatsappText, and whatsappRedact. They get the device and the own IDs as
arguments and read no state of WhatsApp, so the batches, find, and send
can use them after the split of WhatsApp by responsibility. The method
receive copies the device and the own IDs under the mutex, as message
did, and the method redact calls whatsappRedact. The behavior does not
change.

Issue: 6f69ca1
whatsapp.go