]> git.giacomolli.uk - onechat/commit
Give the WhatsApp group names their own type
authorAnderson A. Giacomolli <redacted>
Sun, 8 Nov 2026 21:34:05 +0000 (18:34 -0300)
committerAnderson A. Giacomolli <redacted>
Sun, 8 Nov 2026 21:34:05 +0000 (18:34 -0300)
commit1804474c7a03cca8bf780dd870a985e7badb4331
treeb2f03fd83fee07612b7d414f2b75455ada31d7e6
parent0b97bb2cc4bc0b8f8fe27cc7aa3f9d1d89ed28c8
Give the WhatsApp group names their own type

WhatsAppGroups in whatsapp_groups.go holds the names of the groups, the
time of the last read of the groups from WhatsApp, and the time of the
last read that succeeded, under its own mutex. The batches, find, and
send use it, and the event handler of WhatsApp sets the names of the
group events in it.

WhatsAppLink is a copy of the link of the device: whether it is linked,
the device, the client, whether it is connected, and the own IDs.
WhatsApp keeps these fields under its mutex and gives a copy to each
call of the groups, so the groups read with the current client and never
keep it. No type calls another type while it holds its mutex. The
behavior does not change.

Issue: 6f69ca1
whatsapp.go
whatsapp_groups.go [new file with mode: 0644]