Skip to content

fix(support): WhatsApp contact opens the real chat with the message attached - #707

Merged
islandbitcoin merged 5 commits into
mainfrom
fix/whatsapp-support-message
Aug 24, 2026
Merged

islandbitcoin merged 5 commits into
mainfrom
fix/whatsapp-support-message

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

Fixes #703 — and the bug on the ground is worse than the issue describes.

What the button actually did

openWhatsAppAction(message) accepted the message and dropped it (#703's finding). But the URL it opened, wa.flashapp.me, has served a "WhatsApp support is temporarily unavailable" placeholder card since the 2026-08 account suspension — verified by fetching it. So the button delivered neither the chat nor the message: every user tapping "WhatsApp" dead-ended at a page telling them to email instead, while the restored support number sat reachable.

The fix

Build https://wa.me/<digits>?text=<message> from WHATSAPP_CONTACT_NUMBER (routing decision confirmed with Jabari — inbound goes to the handset).

Two deliberate details:

  • wa.me over the whatsapp:// scheme — the scheme rejects when WhatsApp isn't installed (an unhandled rejection out of a button handler); the universal link opens the app when present and degrades to a browser page.
  • Digits-only number — a literal + in the wa.me path 404s.

Structure

Logic extracted to contact-modal.logic.ts (the existing app-update.logic pattern) so it's testable without dragging the component tree through jest; the component re-exports it, so no caller changes.

Tests

Three, and the third is the one that matters: the message surviving into the URL, the wa.me target (not the placeholder host, no +), and openWhatsAppAction opening exactly the built URL — the original bug was the wiring, and a builder-only test would have passed with the bug present.

88 suites / 864 tests green; tsc + eslint clean.

Dread and others added 5 commits August 24, 2026 06:42
…ttached

Fixes #703 — and the bug on the ground was worse than the issue says.

openWhatsAppAction accepted the message and dropped it, so support lost
the app-version/device context the caller builds. But the URL it opened,
wa.flashapp.me, has served a 'WhatsApp support is temporarily
unavailable' placeholder card since the 2026-08 account suspension —
verified by fetching it — so the button delivered neither the chat NOR
the message: it dead-ended every user at a page telling them to go use
email instead, while the restored support number sat reachable.

Now builds https://wa.me/<digits>?text=<message> from
WHATSAPP_CONTACT_NUMBER. wa.me over the whatsapp:// scheme deliberately:
the scheme rejects when WhatsApp is not installed (an unhandled rejection
out of a button handler), the universal link degrades to a browser page.
Digits-only because a literal + in the wa.me path 404s.

Logic extracted to contact-modal.logic.ts (the app-update.logic pattern)
so it is testable without dragging the component tree through jest; the
component re-exports it. Tests pin the message surviving into the URL,
the wa.me target, and the wiring — the original bug WAS the wiring, and
it would have passed any builder-only test.

88 suites / 864 tests green; tsc and eslint clean.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
…n failure, drop dead helper

Address review findings on #707:

- Derive WHATSAPP_SUPPORT_URL from WHATSAPP_CONTACT_NUMBER (wa.me,
  digits-only) instead of the dead wa.flashapp.me placeholder, fixing the
  three remaining support buttons (Bank Accounts, Need Help, Bank
  Transfer) that still opened the 'support unavailable' card; test pins
  the constant off the placeholder host
- Catch the Linking.openURL rejection in openWhatsAppAction (no
  browser + no WhatsApp on managed/kiosk Android rejects with no
  activity) and surface an email-fallback toast instead of an unhandled
  rejection; new support.whatsappOpenFailed i18n key added to en and all
  23 locale files; test covers the rejection path
- Delete the unused openWhatsApp helper that embedded the whatsapp://
  scheme + '+'-in-number pattern the module doc argues against
- Correct the app-update gate comment that claimed the shared helper
  still points at wa.flashapp.me

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
…act-modal

Review finding: the re-export had zero importers — consumers use ContactModal
directly and the test imports from contact-modal.logic. One import path per
symbol.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
Review residual on #707. The failure toast fired without
currentTranslation, so it fell back to English for every locale — and it
fires precisely for a user whose support attempt just failed, the worst
moment to switch languages on them. openWhatsAppAction now threads the
caller's LL through, following the repo's near-universal toastShow
convention.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
…RT_URL + pin the modal call site

Review fixes for #707:

- buildWhatsAppSupportUrl now builds on the shared WHATSAPP_SUPPORT_URL
  constant instead of re-deriving the wa.me base from
  WHATSAPP_CONTACT_NUMBER with its own digit-strip — one source of truth
  for the support URL, so a future number/host change can't silently
  fork the contact-modal path from the three shared-constant buttons.
- Add a render test for the ContactModal WhatsApp item: press it and
  assert Linking.openURL received buildWhatsAppSupportUrl(messageBody),
  pinning the component call site (the #703 failure shape) one level
  above the exported helper.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NEoz7nBtdtsHyuYG5wNPQV
@islandbitcoin
islandbitcoin merged commit 132b378 into main Aug 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openWhatsAppAction discards its message argument — support contact opens an empty chat

1 participant