feat: implement multi-line session failover with round-robin strategy and session readiness validation for OTP delivery.

This commit is contained in:
Hamza-Ayed
2026-08-29 22:11:10 +03:00
parent f9609b4403
commit aec9fcee72
4 changed files with 154 additions and 62 deletions
+6
View File
@@ -804,11 +804,17 @@ function getActiveSessions() {
return Array.from(sessions.keys());
}
function isSessionReady(session_key) {
const sock = sessions.get(session_key);
return !!(sock && sock.user && sock.user.id);
}
module.exports = {
startSession,
disconnectSession,
sendMessage,
getActiveSessions,
isSessionReady,
checkContact,
exportChatHistory,
throttleManager