fix: finalize channels rename cleanup

This commit is contained in:
Peter Steinberger
2026-01-13 08:25:22 +00:00
parent 84bfaad6e6
commit 6fdfe8ea73
24 changed files with 205 additions and 199 deletions

View File

@@ -42,7 +42,7 @@ export function requireActiveWebListener(accountId?: string | null): {
const listener = listeners.get(id) ?? null;
if (!listener) {
throw new Error(
`No active WhatsApp Web listener (account: ${id}). Start the gateway, then link WhatsApp with: clawdbot providers login --provider whatsapp --account ${id}.`,
`No active WhatsApp Web listener (account: ${id}). Start the gateway, then link WhatsApp with: clawdbot channels login --channel whatsapp --account ${id}.`,
);
}
return { accountId: id, listener };

View File

@@ -1848,7 +1848,7 @@ export async function monitorWebChannel(
if (loggedOut) {
runtime.error(
"WhatsApp session logged out. Run `clawdbot providers login --provider web` to relink.",
"WhatsApp session logged out. Run `clawdbot channels login --channel web` to relink.",
);
await closeListener();
break;

View File

@@ -62,7 +62,7 @@ export async function loginWeb(
});
console.error(
danger(
"WhatsApp reported the session is logged out. Cleared cached web session; please rerun clawdbot providers login and scan the QR again.",
"WhatsApp reported the session is logged out. Cleared cached web session; please rerun clawdbot channels login and scan the QR again.",
),
);
throw new Error("Session logged out; cache cleared. Re-run login.");

View File

@@ -58,7 +58,7 @@ describe("web outbound", () => {
).rejects.toThrow(/No active WhatsApp Web listener/);
await expect(
sendMessageWhatsApp("+1555", "hi", { verbose: false, accountId: "work" }),
).rejects.toThrow(/providers login/);
).rejects.toThrow(/channels login/);
await expect(
sendMessageWhatsApp("+1555", "hi", { verbose: false, accountId: "work" }),
).rejects.toThrow(/account: work/);

View File

@@ -138,7 +138,7 @@ export async function createWaSocket(
if (status === DisconnectReason.loggedOut) {
console.error(
danger(
"WhatsApp session logged out. Run: clawdbot providers login",
"WhatsApp session logged out. Run: clawdbot channels login",
),
);
}