fix(whatsapp): use account-level dmPolicy instead of channel-level#10082
Merged
steipete merged 2 commits intoopenclaw:mainfrom Feb 14, 2026
Merged
fix(whatsapp): use account-level dmPolicy instead of channel-level#10082steipete merged 2 commits intoopenclaw:mainfrom
steipete merged 2 commits intoopenclaw:mainfrom
Conversation
6cc6fb2 to
3c6326e
Compare
3c6326e to
bf4e908
Compare
bf4e908 to
776a914
Compare
52e2837 to
db1b7d7
Compare
db1b7d7 to
9169876
Compare
Contributor
|
Landed via temp rebase onto main.
Thanks @mcaxtr! |
akoscz
pushed a commit
to akoscz/openclaw
that referenced
this pull request
Feb 15, 2026
… (thanks @mcaxtr) Fixes openclaw#10082 (issue openclaw#8736): inbound WhatsApp DM policy now respects account-level dmPolicy overrides.
GwonHyeok
pushed a commit
to learners-superpumped/openclaw
that referenced
this pull request
Feb 15, 2026
… (thanks @mcaxtr) Fixes openclaw#10082 (issue openclaw#8736): inbound WhatsApp DM policy now respects account-level dmPolicy overrides.
vincentkoc
pushed a commit
to vincentkoc/openclaw
that referenced
this pull request
Feb 15, 2026
… (thanks @mcaxtr) Fixes openclaw#10082 (issue openclaw#8736): inbound WhatsApp DM policy now respects account-level dmPolicy overrides.
snowzlm
pushed a commit
to snowzlm/openclaw
that referenced
this pull request
Feb 15, 2026
… (thanks @mcaxtr) Fixes openclaw#10082 (issue openclaw#8736): inbound WhatsApp DM policy now respects account-level dmPolicy overrides.
Benkei-dev
pushed a commit
to Benkei-dev/openclaw
that referenced
this pull request
Feb 15, 2026
… (thanks @mcaxtr) Fixes openclaw#10082 (issue openclaw#8736): inbound WhatsApp DM policy now respects account-level dmPolicy overrides.
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.
Summary
Fixes #8736
checkInboundAccessControl()was readingdmPolicydirectly fromcfg.channels?.whatsapp?.dmPolicy(channel-level config), ignoring account-level overridesaccount.dmPolicywhich is resolved byresolveWhatsAppAccount()with the correct hierarchy:accountCfg?.dmPolicy ?? rootCfg?.dmPolicyaccount.allowFrom(the correct pattern)Impact: When a WhatsApp account has
dmPolicy: "allowlist"but the channel-level default isdmPolicy: "pairing", unauthorized senders would incorrectly receive pairing codes instead of being silently blocked.Test plan
dmPolicy: "allowlist"is ignored when channel-level is"pairing"(test fails before fix)account.dmPolicyinstead ofcfg.channels?.whatsapp?.dmPolicypnpm build && pnpm check && pnpm test)Greptile Overview
Greptile Summary
This PR fixes WhatsApp inbound access control to respect account-level
dmPolicyoverrides by readingdmPolicyfrom the resolved WhatsApp account (resolveWhatsAppAccount) instead of directly from the channel-level config. A regression test was added to ensure that when a channel default isdmPolicy: "pairing"but an account overrides to"allowlist", unauthorized senders are silently blocked rather than receiving pairing codes.This change aligns
dmPolicylookup with the existing pattern used forallowFrom(both now come from the resolved account), and keeps the rest of the inbound gating/pairing logic unchanged.Confidence Score: 5/5