The PR fixes an issue where the WhatsApp Web version is stuck on v2.2413.51 in #2616 and does not automatically update the version in Constants.js, README.md and .version.
How Has This Been Tested
const fetch = require('node-fetch');
async function main() {
let response = await fetch('https://web.whatsapp.com/', {
headers: {
'user-agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
'accept-language': 'en-US,en;q=1',
'sec-fetch-mode': 'navigate',
'cache-control': 'no-cache',
cookie: 'wa_lang_pref=en;wa_build=c',
pragma: 'no-cache',
},
});
let text = await response.text();
if (text) {
const matches = text.match(/"client_revision"\s*:\s*(\d+)/) || [];
if (matches[1]) {
return `2.3000.${matches[1]}`;
}
}
return null;
}
main().then((r) => console.log(r));
Types of changes
[ ] Dependency change
[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[X] My code follows the code style of this project.
[ ] I have updated the documentation accordingly (index.d.ts).
PR Details
The PR fixes an issue where the WhatsApp Web version is stuck on v2.2413.51 in #2616 and does not automatically update the version in
Constants.js
,README.md
and.version
.How Has This Been Tested
Types of changes
Checklist