fix: finalize channels rename cleanup
This commit is contained in:
@@ -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 };
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.");
|
||||
|
||||
@@ -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/);
|
||||
|
||||
@@ -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",
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user