chore: drop twilio and go web-only

This commit is contained in:
Peter Steinberger
2025-12-05 19:03:59 +00:00
parent 869cc3d497
commit 7c7314f673
50 changed files with 335 additions and 5019 deletions

View File

@@ -212,9 +212,12 @@ export function logWebSelfId(
}
export async function pickProvider(pref: Provider | "auto"): Promise<Provider> {
// Auto-select web when logged in; otherwise fall back to twilio.
if (pref !== "auto") return pref;
const choice: Provider = pref === "auto" ? "web" : pref;
const hasWeb = await webAuthExists();
if (hasWeb) return "web";
return "twilio";
if (!hasWeb) {
throw new Error(
"No WhatsApp Web session found. Run `clawdis login --verbose` to link.",
);
}
return choice;
}