diff --git a/wai-server/core/baileys/index.js b/wai-server/core/baileys/index.js index 2171e1c..0456547 100644 --- a/wai-server/core/baileys/index.js +++ b/wai-server/core/baileys/index.js @@ -3,6 +3,7 @@ const { Browsers, DisconnectReason, makeCacheableSignalKeyStore, + fetchLatestWaWebVersion, getMessageFromStore, useMultiFileAuthState, downloadMediaMessage, @@ -35,9 +36,10 @@ const createWhatsApp = async phone => { const authStateFolder = './baileys_auth_info/' + phone; const { state, saveCreds } = await useMultiFileAuthState(authStateFolder); // https://git.../WhiskeySockets/.../src/Utils/generics.ts - // const fetchLatestWaWebVersion - // https://web.whatsapp.com/sw.js, client_revision: 1027426813 - const whatsAppVersion = [2, 3000, 1027426813]; + // const fetchLatestWaWebVersion, fetchLatestWaWebVersion + // https://web.whatsapp.com/sw.js, client_revision: 1031072708 + const { version, isLatest } = await fetchLatestWaWebVersion(); + const whatsAppVersion = version;//[2, 3000, 1031072708]; const stop = () => {