fix(doctor): avoid ack reaction migration without config (#1087)

Thanks @YuriNachos.

Co-authored-by: Yuri Chukhlib <YuriNachos@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-01-17 18:07:06 +00:00
parent 1045b032a2
commit 50c8e74230
3 changed files with 13 additions and 22 deletions

View File

@@ -1,6 +1,4 @@
import type { ClawdbotConfig } from "../config/config.js";
import { hasAnyWhatsAppAuth } from "../web/accounts.js";
export function normalizeLegacyConfigValues(cfg: ClawdbotConfig): {
config: ClawdbotConfig;
changes: string[];
@@ -10,8 +8,7 @@ export function normalizeLegacyConfigValues(cfg: ClawdbotConfig): {
const legacyAckReaction = cfg.messages?.ackReaction?.trim();
const hasWhatsAppConfig = cfg.channels?.whatsapp !== undefined;
const hasWhatsAppAuth = hasAnyWhatsAppAuth(cfg);
if (legacyAckReaction && (hasWhatsAppConfig || hasWhatsAppAuth)) {
if (legacyAckReaction && hasWhatsAppConfig) {
const hasWhatsAppAck = cfg.channels?.whatsapp?.ackReaction !== undefined;
if (!hasWhatsAppAck) {
const legacyScope = cfg.messages?.ackReactionScope ?? "group-mentions";