Deploy: 2026-06-24 15:01:02
This commit is contained in:
@@ -67,11 +67,7 @@ async function startSession(session_key, webhook_url) {
|
||||
clientId: session_key,
|
||||
dataPath: SESSIONS_DIR
|
||||
}),
|
||||
puppeteer: puppeteerConfig,
|
||||
webVersionCache: {
|
||||
type: 'remote',
|
||||
remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2412.54.html',
|
||||
}
|
||||
puppeteer: puppeteerConfig
|
||||
});
|
||||
|
||||
sessions.set(session_key, client);
|
||||
@@ -217,10 +213,16 @@ function getActiveSessions() {
|
||||
return Array.from(sessions.keys());
|
||||
}
|
||||
|
||||
function isSessionReady(session_key) {
|
||||
const client = sessions.get(session_key);
|
||||
return !!(client && client.info && client.info.wid);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
startSession,
|
||||
disconnectSession,
|
||||
sendMessage,
|
||||
getActiveSessions,
|
||||
checkContact
|
||||
checkContact,
|
||||
isSessionReady
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user