Repository navigation
Conversation
Co-Authored-By: GPT-6 <noreply@example.com>
Resolve the original phone first and try its mobile-prefix variant only after confirmed absence. Keep caches and concurrent lookups isolated by input phone. Co-Authored-By: GPT-6 <noreply@example.com>
Co-Authored-By: GPT-6 <noreply@example.com>
Avoid retaining unused expired destinations without creating background timers tied to discarded plugins. Co-Authored-By: GPT-6 <noreply@example.com>
Co-Authored-By: GPT-6 <noreply@example.com>
99e92b6 to
254906c
Compare
closes #2260 Co-authored-by: ropu <rovagnati@gmail.com>
|
Let's try dev image 🤞🏻 Make sure to select the engine via the environment variable -
🚀 Will be included in the next release! |
|
Thanks for integrating this! I confirmed that 3ac4ab0 includes the Argentine app in the shared phone-number framework and references this PR. I pulled These were the shipped component tests with mocked lookups; I did not rerun live WhatsApp delivery or deploy the dev image to our worker. The earlier live GOWS delivery results remain documented in the PR. Since the functionality is already implemented in |
|
Problem and behavior
On a real GOWS session (WAHA 2026.8.2), sending directly to
5411XXXXXXXX@c.usfailed with HTTP 500 (no LID found), even thoughcheckNumberStatusresolved that phone to the canonical54911XXXXXXXX@c.usPN and a LID. Passing the canonical PN tosendTextsucceeded and received a DEVICE acknowledgement.Integrations may supply Argentine destinations as
54 + national numberor549 + national number. This adds an opt-inargentine-phone-numbersapp that resolves the supplied phone throughcheckNumberStatusbefore sending. It tries the other form only after WhatsApp explicitly reports that the original does not exist, then sends once to the returned PN/JID or LID.For example, if
5411XXXXXXXXis absent and54911XXXXXXXXresolves, the send uses the returned identifier. If the original exists, it wins. Both forms may resolve independently: cache entries and concurrent lookups are keyed by the original input, not the candidate pair.This follows the apps/session-plugin direction described in #2180. It uses existing hooks and engine interfaces; there are no engine changes or new HTTP endpoints.
Scope
+,@c.usand@s.whatsapp.net.lookup,strictandmemoryTtlconfiguration.011/15forms or missing country codes, and no alternate-contact shortcut that would bypass checking the original.Configuration and a reproducible live validation procedure are in
src/apps/argentine-phone-numbers/README.md.Validation
yarn test:unit --runInBand argentine-phone-numbers: 47 passed. Includes real hook registration, native JID conversion, recursive lookup prevention, separate accounts/caches, concurrent queries, LIDs, expiry without background timers, negative results and transient failures.yarn tsc --noEmit: passed.yarn oxlint --deny-warnings: passed.yarn build: passed.92c7923c35cbb8e5975f30fec66440b571c2c12f: test sessions omitmedia.events, and two repository date tests fail. These files are unchanged.docker buildx build --target build --output type=cacheonly .passed on the final code. The complete build stage was rebuilt; no runtime image was exported or deployed. An earlier image-export attempt was canceled after compilation while exporting layers.Live validation — 2026-09-10
Tested the compiled plugin at
51c0039with realSessionHooks/RegisterPluginHooks, using a remote API adapter to a paired WAHA 2026.8.2 Core / GOWS session (Linux x64). The resolved destination was sent through that same session'ssendTextendpoint. The running worker was not changed or restarted: this exercises resolver integration with real WhatsApp lookup and delivery, not installation/lifecycle of the app inside the worker.checkNumberStatuswith/without954911…@c.usPN5411…@c.usno LID found for 5411…@s.whatsapp.net from server9, then sendsack=2,ackName=DEVICE9, then sendsack=2,ackName=DEVICETwo test messages reached the explicitly authorized recipient's device. All personal/session identifiers and raw responses are omitted from the PR. The README records the redacted evidence and procedure.
This recipient exercises canonicalization of a positive lookup, not the alternate-candidate fallback after absence. The fallback is unit-tested. No live WEBJS/NOWEB/WPP delivery coverage or installed-app lifecycle validation is claimed.