Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(session): do not assert which spelling drops the mobile marker
Yudhi Armyndharise7db65bff865
diff --git a/src/modules/session/message-mutation-guard.spec.ts b/src/modules/session/message-mutation-guard.spec.tsindex ee53fa368..542f47e55 100644--- a/src/modules/session/message-mutation-guard.spec.ts+++ b/src/modules/session/message-mutation-guard.spec.ts@@ -38,8 +38,8 @@ describe('mutationTargetsForeignRow', () => {}});- // A REST send keeps the number as its caller wrote it ('+', spaces, no mobile marker digit) while the- // engine reports the canonical one.+ // A REST send keeps the number as its caller wrote it ('+', spaces, with or without the mobile marker+ // digit) while the engine reports its own spelling, which can differ either way.it('reads the spellings of one phone number as one chat', () => {const spellings: Array<[string, string]> = [['[email protected]', '[email protected]'],diff --git a/src/modules/session/message-mutation-guard.ts b/src/modules/session/message-mutation-guard.tsindex 19f345f86..115f77812 100644--- a/src/modules/session/message-mutation-guard.ts+++ b/src/modules/session/message-mutation-guard.ts@@ -20,8 +20,9 @@ export interface MutationSource {/*** What two spellings of one phone number share: its digits, without a '+', spaces or dashes, and without- * the mobile marker digit that the id WhatsApp reports for a Brazilian, Mexican or Argentine number- * drops, which a REST caller usually types (a send stores the chat id as its caller wrote it).+ * the mobile marker digit that a Brazilian (`55` + area + `9`), Mexican (`521`) or Argentine (`549`) number+ * is written with in one spelling and without in the other. A send stores the chat id as its caller wrote+ * it, so the stored form and the one the engine reports can differ in either direction.*/function phoneKey(local: string): string {return local