Repository navigation
Add WhatsApp Chinese send guard - #2560
Open
huic0279-stack wants to merge 1 commit into
Open
huic0279-stack wants to merge 1 commit into
huic0279-stack wants to merge 1 commit into
Conversation
Author
|
Hi maintainers, this PR is ready for review. The two GitHub Actions workflows are awaiting maintainer approval. |
Author
|
Local validation completed:
Manual VM 103 WhatsApp/Ferdium validation:
The two GitHub Actions workflows are still awaiting maintainer approval. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-flight Checklist
Please ensure you've completed all of the following.
Description of Change
Adds a WebView preload send guard that blocks WhatsApp/Ferdium drafts containing Han characters before the first real send attempt.
The guard intercepts Enter, beforeinput paragraph, submit, and send-button click/touch attempts before they can reach WhatsApp send handling. It allows drafts without Han characters, including English, numbers, emoji, URLs, email addresses, and Chinese punctuation-only text.
This also adds focused unit tests for the blocking policy and documents the VM 103 installed-Ferdium hotfix path used during validation.
Motivation and Context
OneChat stage 1 needs Chinese customer-facing drafts to fail closed: if a WhatsApp input contains Chinese Han characters, the first send attempt must be blocked so Chinese text cannot be sent to customers by mistake.
IME composition is ignored until the draft text is committed.
Screenshots
Validated manually on VM 103 WhatsApp/Ferdium:
你好was blocked with:检测到中文,已阻止发送。中文不会发送给客户。Hello 123 😀 https://example.com a@b.comwas allowed.Checklist
.tmp/translation-panel.jsBiome size limitpnpm testpassesRelease Notes
Add a WhatsApp/Ferdium Chinese send guard that blocks drafts containing Han characters before send.