feat: add getMedia
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user