Skip to content

Doctor: avoid re-adding WhatsApp config#927

Closed
grp06 wants to merge 4 commits intoopenclaw:mainfrom
grp06:fix/issue-900-whatsapp-doctor
Closed

Doctor: avoid re-adding WhatsApp config#927
grp06 wants to merge 4 commits intoopenclaw:mainfrom
grp06:fix/issue-900-whatsapp-doctor

Conversation

@grp06
Copy link
Copy Markdown
Member

@grp06 grp06 commented Jan 15, 2026

Summary

Testing

  • pnpm test -- src/commands/doctor-legacy-config.test.ts (ran full suite)

AI Assistance

  • AI-assisted (opencode); I reviewed the changes and understand the diff.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 669a39d57f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +221 to +223
const legacyAckReaction = cfg.messages?.ackReaction?.trim();
if (legacyAckReaction) {
const hasWhatsAppConfig = cfg.channels?.whatsapp !== undefined;
if (legacyAckReaction && hasWhatsAppConfig) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep migrating ackReaction for default WhatsApp configs

This new guard skips the migration whenever channels.whatsapp is absent, but WhatsApp can still be active with no config section (e.g., listWhatsAppAccountIds falls back to the default account and resolveWhatsAppAccount only reads cfg.channels?.whatsapp for ackReaction). For users who only set messages.ackReaction and rely on default WhatsApp config, running doctor will no longer copy that setting into channels.whatsapp.ackReaction, so WhatsApp acks silently stop. If the goal is to avoid re-adding for non‑WhatsApp users, consider checking for actual WhatsApp usage (auth/account presence) rather than the config section’s existence.

Useful? React with 👍 / 👎.

@steipete steipete self-assigned this Jan 15, 2026
steipete added a commit that referenced this pull request Jan 15, 2026
Thanks @grp06.

Co-authored-by: George Pickett <gpickett00@gmail.com>
@steipete steipete closed this Jan 15, 2026
@steipete
Copy link
Copy Markdown
Contributor

Landed via squash+rebase onto main.

Commit: 1078d17

Thanks @grp06!

zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Thanks @grp06.

Co-authored-by: George Pickett <gpickett00@gmail.com>
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.

2 participants