Skip to content

fix(channels): include linked field in WhatsApp describeAccount - #1050

Closed
YuriNachos wants to merge 4 commits into
openclaw:mainfrom
YuriNachos:fix/issue-1030-whatsapp-linked-status
Closed

YuriNachos wants to merge 4 commits into
openclaw:mainfrom
YuriNachos:fix/issue-1030-whatsapp-linked-status

Conversation

@YuriNachos

Copy link
Copy Markdown
Contributor

Summary

Fixes #1030

clawdbot status shows inconsistent information about WhatsApp connection state. The Channels section shows "Not linked" while the Health section correctly shows "LINKED".

Root Cause

The describeAccount function in src/channels/plugins/whatsapp.ts was not returning the linked field. The Channels status display relies on this field to show the correct link status.

Fix

Added the linked field to describeAccount, set to Boolean(account.authDir) (same as the configured field). This ensures that:

  • The Channels section now correctly shows "linked" when WhatsApp auth exists
  • The Channels and Health sections show consistent status
  • The status matches the actual WhatsApp connection state

Testing

  • Ran clawdbot status - Channels section now shows "linked" when WhatsApp is connected
  • Ran clawdbot status --deep - Health section still shows correct "LINKED" status
  • Both sections now show consistent status information

Files Changed

  • src/channels/plugins/whatsapp.ts: Added linked: Boolean(account.authDir) to describeAccount return value

Checklist

  • Code follows project style guidelines
  • Tested locally with my Clawdbot instance
  • Keeps PR focused (single fix)

🤖 AI-assisted PR

  • Developed with assistance from Claude (Anthropic AI)
  • Testing: Light testing (manual verification)
  • I understand what the code does: this fix ensures the linked field is populated for WhatsApp status display

@steipete steipete self-assigned this Jan 16, 2026
@steipete

Copy link
Copy Markdown
Contributor

This PR is quite dirty, you mixed in the previous changes.

Findings

  • High: URL-only handling breaks image gen for b64_json responses.
    skills/openai-image-gen/scripts/gen.py:214-225 now throws if
    data[0].url missing; gpt-image-* and some DALL·E responses still
    return b64_json when response_format is omitted. Suggest: accept
    url OR b64_json (decode fallback), or keep response_format where
    supported.
  • Medium: /new now clears all persisted per-session overrides, not
    just compaction count. src/auto-reply/reply/session.ts:281-295
    replaces the entry entirely for new sessions, dropping model
    overrides, queue/send policy, etc. If /new is meant to reset
    conversation only, this is a regression. Suggest: merge existing
    entry but explicitly zero compactionCount (and related counters),
    or preserve a whitelist of overrides.
  • Low: chmod failures can block session persistence on non-POSIX
    mounts. src/config/sessions/store.ts:136-155 now treats chmod
    errors as fatal; on some filesystems this can throw. Suggest:
    ignore chmod errors (best-effort) so writes still succeed.

Questions / Assumptions

  • Is /new intended to keep per-session overrides (model/thinking/
    queue)? If yes, current behavior needs narrowing to compaction-
    only reset.
  • Are we expecting OpenAI Images API to always return URLs for all
    models? If not, we should keep a dual-path response handler.

Change summary

  • Adds web-search localization params + tests/docs; fixes WhatsApp
    linked status; tightens session-store permissions; resets session
    state on /new.

YuriNachos and others added 4 commits January 16, 2026 23:49
Fixes openclaw#1030

The describeAccount function for WhatsApp was not returning the
linked field, causing the Channels status section to show
"Not linked" even when WhatsApp was properly linked and working.

The fix adds the linked field to describeAccount, set to the same
value as configured (Boolean(account.authDir)). This ensures that
the Channels section and Health section show consistent status.
@steipete
steipete force-pushed the fix/issue-1030-whatsapp-linked-status branch from 5d24b48 to 6e2e5bd Compare January 16, 2026 23:58
steipete added a commit that referenced this pull request Jan 16, 2026
Co-authored-by: Yurii Chukhlib <[email protected]>
@steipete

Copy link
Copy Markdown
Contributor

Thanks @YuriNachos! I rebased this PR down to the WhatsApp fix plus follow-up fixes (session /new reset preserves overrides; image-gen handles base64 + URL responses) and added changelog entries.

Landed on main via:

Closing this PR since it is now landed on main and the other commits were already merged elsewhere.

Tests: pnpm lint ✅; pnpm build ❌ (missing @mozilla/readability + linkedom); pnpm test ❌ (gateway-cli coverage timeout; sandbox-explain timeout; web-tools.readability text/markdown).

@steipete steipete closed this Jan 16, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
zeekay pushed a commit to Dream-AI-4444/clawdbot that referenced this pull request Sep 11, 2026
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
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.

Status display inconsistency: WhatsApp shows 'Not linked' in Channels but 'LINKED' in Health

2 participants