@open-wa/wa-automate 4.34.1 → 4.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/Client.d.ts +1 -1
- package/dist/api/Client.js +3 -2
- package/package.json +1 -1
package/dist/api/Client.d.ts
CHANGED
@@ -701,7 +701,7 @@ export declare class Client {
|
|
701
701
|
* Returns a PNG DataURL screenshot of the session
|
702
702
|
* @returns `Promise<DataURL>`
|
703
703
|
*/
|
704
|
-
getSnapshot(): Promise<DataURL>;
|
704
|
+
getSnapshot(chatId?: ChatId): Promise<DataURL>;
|
705
705
|
/**
|
706
706
|
* Returns an array of group ids where the host account is admin
|
707
707
|
*/
|
package/dist/api/Client.js
CHANGED
@@ -1692,9 +1692,10 @@ class Client {
|
|
1692
1692
|
* Returns a PNG DataURL screenshot of the session
|
1693
1693
|
* @returns `Promise<DataURL>`
|
1694
1694
|
*/
|
1695
|
-
getSnapshot() {
|
1695
|
+
getSnapshot(chatId) {
|
1696
1696
|
return __awaiter(this, void 0, void 0, function* () {
|
1697
|
-
const
|
1697
|
+
const snapshotElement = chatId ? yield this._page.evaluateHandle(({ chatId }) => WAPI.getSnapshotElement(chatId), { chatId }) : this.getPage();
|
1698
|
+
const screenshot = yield snapshotElement.screenshot({
|
1698
1699
|
type: "png",
|
1699
1700
|
encoding: "base64"
|
1700
1701
|
});
|
package/package.json
CHANGED