chore: drop twilio and go web-only
This commit is contained in:
1 parent
869cc3d497
commit
7c7314f673
50 files changed
+335
-5019
No files matched your search
+7
-4
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user