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