mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
auto connect socket
This commit is contained in:
@@ -34,11 +34,8 @@ export const makeSocket = (config: SocketConfig) => {
|
||||
const ws = new MobileSocket(config)
|
||||
ws.setMaxListeners(0)
|
||||
|
||||
if(!config.mobile) {
|
||||
// if not mobile -> auto connect
|
||||
ws.connect()
|
||||
} else if(config.auth.creds.registered) {
|
||||
// if mobile and registered -> auto connect
|
||||
// if not mobile or already registered -> auto connect
|
||||
if(!config.mobile || config.auth.creds.registered) {
|
||||
ws.connect()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user