diff --git a/whatsapp-gateway/baileys-client.js b/whatsapp-gateway/baileys-client.js index 38ebcf5..97ca01a 100644 --- a/whatsapp-gateway/baileys-client.js +++ b/whatsapp-gateway/baileys-client.js @@ -7,6 +7,13 @@ const axios = require('axios'); const fs = require('fs'); const path = require('path'); +// Suppress verbose libsignal debug logs (prints full key material) +const _log = console.log; +console.log = (...args) => { + if (args[0] && typeof args[0] === 'string' && args[0].startsWith('Closing session:')) return; + _log(...args); +}; + const sessions = new Map(); // Store active sockets in memory const retryCounters = new Map(); // Track reconnection attempts per session const recentMessages = new Map(); // Cache of recent messages in memory to serve getMessage callback @@ -72,8 +79,6 @@ async function startSession(session_key, webhook_url) { logger: logger, browser: ['Flash Call OTP Gateway', 'Chrome', '120.0.0'], msgRetryCounterCache, - markOnlineOnConnect: true, - syncFullHistory: true, keepAliveIntervalMs: 30000, getMessage: async (key) => { const compoundKey = `${key.remoteJid}:${key.id}`;