feat: add getMedia
This commit is contained in:
Vendored
+4
-1
@@ -2,7 +2,7 @@
|
||||
// ==UserScript==
|
||||
// @name WhatsApp Web Bridge
|
||||
// @namespace https://rul.sh/
|
||||
// @version 0.0.4
|
||||
// @version 0.0.5
|
||||
// @description WhatsApp Web WebSocket bridge
|
||||
// @match https://web.whatsapp.com/*
|
||||
// @updateURL https://git.rul.sh/khairul169/whatsapp-bridge/raw/branch/main/dist/whatsapp-bridge.user.js
|
||||
@@ -308,6 +308,9 @@
|
||||
);
|
||||
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.method}`);
|
||||
}
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user