mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 19:01:47 +03:00
fix: force telegram native fetch under bun
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// BAN compatibility: force native fetch to avoid grammY's node-fetch shim under Bun.
|
||||
export function resolveTelegramFetch(proxyFetch?: typeof fetch): typeof fetch {
|
||||
const fetchImpl = proxyFetch ?? globalThis.fetch;
|
||||
if (!fetchImpl) {
|
||||
throw new Error("fetch is not available; set telegram.proxy in config");
|
||||
}
|
||||
return fetchImpl;
|
||||
}
|
||||
Reference in New Issue
Block a user