Skip to content

Commit

Permalink
feat: get current whatsapp web version
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroslopez committed Apr 11, 2020
1 parent 702a0ab commit 8e011e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Client.js
Expand Up @@ -335,6 +335,17 @@ class Client extends EventEmitter {
async destroy() {
await this.pupBrowser.close();
}

/**
* Returns the version of WhatsApp Web currently being run
* @returns Promise<string>
*/
async getWWebVersion() {
return await this.pupPage.evaluate(() => {
return window.Debug.VERSION;
});
}

/**
* Mark as seen for the Chat
* @param {string} chatId
Expand All @@ -348,6 +359,7 @@ class Client extends EventEmitter {
}, chatId);
return result;
}

/**
* Send a message to a specific chatId
* @param {string} chatId
Expand Down

0 comments on commit 8e011e0

Please sign in to comment.