8 Commits
Author SHA1 Message Date
jfengandClaude Opus 5.5 b140fdb390 fix(send): send to known LIDs passed as phone numbers; expose version
Docker - Build e Publicacao / Build, Scan e Publicacao (push) Successful in 2m28s
CI - Validacao Go / Validar Codigo e Testes (push) Successful in 3m58s
Docker - Promover latest / Promover release para latest (push) Successful in 4m39s
Integrations that store the contact's LID as its number (255284433936406)
failed with 'no LID found for [email protected]'. When the number
is not a registered phone and the instance's LID store maps it to a phone
number, send to <number>@lid instead.

GET /server/ok now also returns the running version, so a deployment can be
checked without reading the startup log.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-11 08:15:58 -03:00
jfengandClaude Opus 5.5 e02441fc4e style: gofmt files touched by the community fixes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 13:12:30 -03:00
EcoosUP 0c4ac7d9a9 fix(concurrency): guard the three shared maps with a mutex
clientPointer, myClientPointer and killChannel are created once at startup and
passed by reference into eleven packages. All of them read and wrote those plain
Go maps from different goroutines, with no synchronisation.

Go does not tolerate that: the runtime kills the process with

    fatal error: concurrent map writes

and a fatal error is not recoverable — a deferred recover() does not catch it.

Measured in production: the process died inside StartClient while five instances
were connecting at once. The orchestrator restarted it within seconds, but every
number was offline in the meantime, and it repeats on any restart that brings up
more than a couple of instances together.

The three maps become safemap.Map[T], a generic wrapper over a RWMutex. It lives
in its own package because MyClient is defined in pkg/whatsmeow/service, and
putting the type there would create an import cycle with the ten packages that
receive the maps.

98 call sites changed across 12 files, with the compiler as the judge: anything
missed is a build error, not a silent bug.

Tests: with -race, a plain map running the same exercise reports DATA RACE and
fails, while safemap.Map passes. Both halves verified.

(cherry picked from commit 3860fa278dc2b901705ffbddbed5cf59d70a85e4)
2026-11-09 12:01:08 -03:00
github-actions[bot] 9337afc47e sync: 0.7.2 from main (6164dced8d3ab8f9bcce9bf333fb4e8663760ff1) 2026-07-03 01:55:33 +00:00
github-actions[bot] fdf612350a sync: 0.7.0 from main (3f0d10f172101035f4e0f736695e1700ee1ec967) 2026-04-17 18:41:28 +00:00
github-actions[bot] 182a719053 sync: 0.6.1 from main (b5abe7465d4c5e70c055b9015416f95d4b434221) 2026-03-25 22:27:23 +00:00
github-actions[bot] e319b8b8d8 sync: 0.6.1 from main (d2270ddac1307da38af1affd55840e19d9c4a298) 2026-03-25 16:15:07 +00:00
Davidson Gomes 877eef7f07 release: v0.6.1 2026-03-25 12:40:16 -03:00