Deploy: 2026-06-24 15:32:02
This commit is contained in:
@@ -455,11 +455,17 @@ function getActiveSessions() {
|
||||
return Array.from(sessions.keys());
|
||||
}
|
||||
|
||||
function isSessionReady(session_key) {
|
||||
const sock = sessions.get(session_key);
|
||||
return !!(sock && sock.user);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
startSession,
|
||||
disconnectSession,
|
||||
sendMessage,
|
||||
getActiveSessions,
|
||||
checkContact
|
||||
checkContact,
|
||||
isSessionReady
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"start": "node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@whiskeysockets/baileys": "^6.7.0",
|
||||
"whatsapp-web.js": "^1.26.0",
|
||||
"puppeteer": "^21.0.0",
|
||||
"qrcode": "^1.5.3",
|
||||
|
||||
@@ -20,7 +20,7 @@ for (const p of envPaths) {
|
||||
|
||||
const express = require('express');
|
||||
const cors = require('cors');
|
||||
const { startSession, disconnectSession, sendMessage, getActiveSessions, checkContact, isSessionReady } = require('./puppeteer-client');
|
||||
const { startSession, disconnectSession, sendMessage, getActiveSessions, checkContact, isSessionReady } = require('./baileys-client');
|
||||
|
||||
const app = express();
|
||||
app.use(cors());
|
||||
|
||||
Reference in New Issue
Block a user