feat: add getMedia

This commit is contained in:
2026-09-16 05:07:21 +08:00
parent d673055210
commit 78faf2b070
7 changed files with 25 additions and 5 deletions
+6
View File
@@ -108,6 +108,12 @@ async function handleRequest(request: BridgeRequest) {
return serialize(result);
}
case "getMedia":
const media = await WPP.chat
.downloadMedia(request.params)
.then(WPP.util.blobToBase64);
return media;
default:
throw new Error(`Unknown method: ${(request as any).method}`);
}