mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 20:26:16 +00:00
refactor(msteams,bluebubbles): dedupe inbound media download helpers
This commit is contained in:
12
extensions/bluebubbles/src/request-url.ts
Normal file
12
extensions/bluebubbles/src/request-url.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export function resolveRequestUrl(input: RequestInfo | URL): string {
|
||||
if (typeof input === "string") {
|
||||
return input;
|
||||
}
|
||||
if (input instanceof URL) {
|
||||
return input.toString();
|
||||
}
|
||||
if (typeof input === "object" && input && "url" in input && typeof input.url === "string") {
|
||||
return input.url;
|
||||
}
|
||||
return String(input);
|
||||
}
|
||||
Reference in New Issue
Block a user