Add tel scheme support to WhatsApp channels and flip existing URNs#6703
Add tel scheme support to WhatsApp channels and flip existing URNs#6703norkans7 wants to merge 7 commits into
Conversation
|
Claude finished @norkans7's task in 5m 54s —— View job Claude PR Review
SummaryThe channel-type side of the change (adding Findings
|
WhatsApp channel types now support the tel scheme in addition to whatsapp, and enable international sending. Migration 0211 backfills tel scheme and allow_international onto existing whatsapp-scheme channels. Migration 0217 flips existing contact URNs to the new scheme model: whatsapp -> tel (with leading +) and bsuid -> whatsapp, skipping rows that would collide with an existing URN and reindexing affected contacts.
c87f16f to
006b6b6
Compare
…erage - only flip all-digit whatsapp paths to tel, making 0217 safe to re-run - cover the bsuid->whatsapp collision-skip path and re-apply idempotency - add a MigrationTest for 0211_add_tel_scheme
… id semantics After the flip, whatsapp URNs hold a business-scoped id (CC.alphanumeric) rather than a phone number: - validate whatsapp paths as the BSUID pattern instead of all-digits - stop phone-formatting whatsapp in URN.format (was rendering a spurious +) - uppercase the country code prefix when normalizing whatsapp paths
…s-scoped id gocommon (PR #218) validates whatsapp paths as either all-digits (legacy phone) or a business-scoped id (CC.alphanumeric). Match that here so the Python and Go layers agree - notably for collision-skipped digit whatsapp URNs the flip migration intentionally leaves in place.
… row - hoist the BSUID path pattern into URN.BSUID_PATH_REGEX, referenced by both the whatsapp and bsuid branches of URN.validate (mirrors gocommon) - in the flip migration, compute each row's target path/identity a single time instead of via a twice-evaluated closure
WhatsApp channels have no country set, so goflow's international-routing gate (which only fires when the channel country differs from the destination) never applies to them - setting allow_international was a no-op. Drop it from the 0211 migration and from every WhatsApp-family claim view; the tel scheme is still added, and the update form still exposes the (default off) toggle.
WhatsApp channel types now support the tel scheme in addition to whatsapp, and enable international sending. Migration 0211 backfills tel scheme and allow_international onto existing whatsapp-scheme channels.
Migration 0217 flips existing contact URNs to the new scheme model: whatsapp -> tel (with leading +) and bsuid -> whatsapp, skipping rows that would collide with an existing URN and reindexing affected contacts.