From d8fa9051c229417d9cfc3adfaabc64718fa18697 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Sat, 23 May 2026 17:05:57 +0300 Subject: [PATCH] =?UTF-8?q?=D8=AA=D8=AB=D8=A8=D9=8A=D8=AA=20=D8=A5=D8=B5?= =?UTF-8?q?=D8=AF=D8=A7=D8=B1=20=D9=88=D8=A7=D8=AA=D8=B3=D8=A7=D8=A8=20?= =?UTF-8?q?=D9=88=D9=8A=D8=A8=20=D9=85=D8=B3=D8=AA=D9=82=D8=B1=20=D9=84?= =?UTF-8?q?=D8=AD=D9=84=20=D9=85=D8=B4=D9=83=D9=84=D8=A9=20=D9=81=D8=B4?= =?UTF-8?q?=D9=84=20=D8=A7=D9=84=D8=B1=D8=A8=D8=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- whatsapp-gateway/baileys-client.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/whatsapp-gateway/baileys-client.js b/whatsapp-gateway/baileys-client.js index e60190d..158041a 100644 --- a/whatsapp-gateway/baileys-client.js +++ b/whatsapp-gateway/baileys-client.js @@ -57,15 +57,9 @@ async function startSession(session_key, webhook_url) { const sessionFolder = path.join(SESSIONS_DIR, session_key); const { state, saveCreds } = await useMultiFileAuthState(sessionFolder); - // Fetch the latest WhatsApp Web version to avoid 405 rejection - let version; - try { - const versionInfo = await fetchLatestBaileysVersion(); - version = versionInfo.version; - console.log(`[Baileys] Using WA version: ${version}`); - } catch (e) { - console.warn(`[Baileys] Could not fetch version, using default`); - } + // Use a hardcoded stable version to prevent parsed timestamp version errors which reject pairing + const version = [2, 3000, 1017, 0]; + console.log(`[Baileys] Using stable WA version: ${version}`); const logger = pino({ level: 'silent' });