#19358: test(signal): add E.164 format acceptance for signal target detection
size: XS
Cluster:
Signal Reaction Fixes
Fix Signal media validation rejecting valid conversation targets.
Fixes #18783
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR fixes a bug where `looksLikeSignalTargetId` rejected `signal:`-prefixed E.164 phone numbers (e.g. `signal:+15551234567`), causing media and message send operations to fail when targets were specified with the full channel-qualified prefix.
- In `signal.ts`, the final phone-number check now strips an optional `signal:` prefix before applying the `/^\+?\d{3,}$/` regex, consistent with how `normalizeSignalMessagingTarget` already handled the prefix.
- The test block in `plugins-channel.test.ts` covers both positive cases (`signal:+E.164`, bare `+E.164`) and negative cases (`signal:notanumber`, `signal:` empty string), giving reasonable coverage for the new branch.
- The fix is minimal, targeted, and consistent with the existing prefix-stripping pattern used throughout `signal.ts` and `extensions/signal/src/channel.ts`.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge; the change is a small, well-targeted regex fix with adequate test coverage and no regressions to existing behavior.
- The diff is two files, a single-line logic change plus five test assertions. The fix is directly analogous to how `normalizeSignalMessagingTarget` already handles the `signal:` prefix. Manual trace of old vs new behavior confirms only `signal:`-prefixed phone numbers are newly accepted, which is the intended fix. Negative cases are tested. No security concerns, no regressions to UUID/group/username paths.
- No files require special attention.
<sub>Last reviewed commit: 9819b2f</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#18511: fix(signal): signal:-prefixed phone numbers fail target resolution ...
by yinghaosang · 2026-02-16
87.5%
#16562: fix(signal): preserve case for group and username targets
by akalypse · 2026-02-14
80.7%
#10958: fix: Signal UUID allowlist entries silently fail when sourceNumber ...
by meaadore1221-afk · 2026-02-07
74.5%
#17818: Fix Signal reaction notification missing sender (support legacy 'so...
by Clawborn · 2026-02-16
74.4%
#17070: fix(telegram): Outbound: ignore empty legacy target fields
by yhw2003 · 2026-02-15
73.3%
#4878: fix: string/type handling and API fixes (#4537, #4380, #4373, #4547...
by lailoo · 2026-01-30
73.0%
#22335: fix: harden normalizeE164 against empty/invalid inputs returning ba...
by CZH-THU · 2026-02-21
72.7%
#17380: fix(imessage): reject non-numeric chat_id values to prevent silent ...
by aldoeliacim · 2026-02-15
72.6%
#8271: feat(signal): Add full quoted message context support
by ProofOfReach · 2026-02-03
71.0%
#23723: feat(message): improve send param ergonomics and actionable routing...
by SmithLabsLLC · 2026-02-22
70.8%