Repository navigation
fix(whatsapp): gate connect-time presence on selfChatMode to preserve phone notifications - #59410
Merged
Merged
Conversation
… phone notifications
mcaxtr
force-pushed
the
fix/whatsapp-selfchat-presence
branch
from
April 2, 2026 04:19
f8032cb to
30d4466
Compare
Contributor
Greptile SummaryThis PR fixes a bug where The fix is minimal and well-scoped: a single ternary in Key changes:
Confidence Score: 5/5
Reviews (1): Last reviewed commit: "fix(whatsapp): gate connect-time presenc..." | Re-trigger Greptile |
steipete
pushed a commit
to duncanita/openclaw
that referenced
this pull request
Apr 4, 2026
… phone notifications (openclaw#59410)
This was referenced Apr 25, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
… phone notifications (openclaw#59410)
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
… phone notifications (openclaw#59410)
2 of 16 tasks
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 24, 2026
… phone notifications (openclaw#59410)
Nachx639
pushed a commit
to Nachx639/clawdbot
that referenced
this pull request
Jun 17, 2026
… phone notifications (openclaw#59410)
vixco
pushed a commit
to vixco/openclaw
that referenced
this pull request
Aug 16, 2026
… phone notifications (openclaw#59410)
globalcaos
pushed a commit
to globalcaos/tinkerclaw
that referenced
this pull request
Sep 29, 2026
… phone notifications (openclaw#59410)
lhfer
pushed a commit
to lhfer/openclaw
that referenced
this pull request
Oct 11, 2026
… phone notifications (openclaw#59410)
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
sendPresenceUpdate("available")on connect, overridingmarkOnlineOnConnect: falseinsession.tsand causing WhatsApp to suppress all phone push notifications for the linked number.selfChatModeflag — sends"unavailable"for personal-phone setups and keeps"available"for dedicated bot numbers."composing"presence, read receipt behavior, message processing, reconnect logic, config types, and zod schema are all untouched. No new config fields.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause / Regression History (if applicable)
extensions/whatsapp/src/inbound/monitor.ts:72calledsendPresenceUpdate("available")unconditionally on connect, overriding themarkOnlineOnConnect: falseBaileys option insession.ts:129."available"call was added early in the WhatsApp channel implementation.markOnlineOnConnect: falsewas later set in session.ts with the right intent, but the explicit call was never updated to match.Regression Test Plan (if applicable)
extensions/whatsapp/src/monitor-inbox.streams-inbound-messages.test.tsselfChatMode: true, the firstsendPresenceUpdatecall sends"unavailable"instead of"available".sendPresenceUpdate("available")— they now assert the nth-call pattern and a new test covers theselfChatMode: truepath.User-visible / Behavior Changes
selfChatMode: true): phone push notifications are restored. The WhatsApp account shows "last seen at..." instead of permanent "online" status. Per-chat "typing..." indicators remain.selfChatMode: falseor unset): no change.Diagram (if applicable)
Security Impact (required)
sendPresenceUpdatecall, different argument.Repro + Verification
Environment
Steps
selfChatMode: true(or select "personal phone" during onboarding)Expected
Actual (before fix)
Evidence
All 23 scoped tests pass (14 in streams-inbound-messages, 9 in captures-media-path-image-messages).
pnpm checkclean.Human Verification (required)
selfChatModeundefined (falls back tofalse, sends"available"— no behavior change for existing users).Review Conversations
Compatibility / Migration
selfChatModefield.Risks and Mitigations
selfChatMode: truewho relied on permanent "online" status.selfChatModeindicates a personal phone where losing all notifications is almost certainly undesirable. The "online" indicator was a side effect, not a feature.