-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Doctor: avoid re-adding WhatsApp config #927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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".
src/commands/doctor-legacy-config.ts
Outdated
| const legacyAckReaction = cfg.messages?.ackReaction?.trim(); | ||
| if (legacyAckReaction) { | ||
| const hasWhatsAppConfig = cfg.channels?.whatsapp !== undefined; | ||
| if (legacyAckReaction && hasWhatsAppConfig) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 👍 / 👎.
Thanks @grp06. Co-authored-by: George Pickett <[email protected]>
|
Landed via squash+rebase onto main.
Commit: 1078d17 Thanks @grp06! |
Thanks @grp06. Co-authored-by: George Pickett <[email protected]>
Thanks @grp06. Co-authored-by: George Pickett <[email protected]>
Summary
Testing
AI Assistance