feat: implement multi-line session failover with round-robin strategy and session readiness validation for OTP delivery.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user