fix: fire "connection-update" on legacy socket create

This commit is contained in:
Adhiraj Singh
2021-12-18 22:30:03 +05:30
parent f61f553e01
commit ae59d6e9c6

View File

@@ -220,6 +220,16 @@ const makeAuthSocket = (config: LegacySocketConfig) => {
printQRIfNecessaryListener(ev, logger)
}
process.nextTick(() => {
ev.emit('connection.update', {
connection: 'connecting',
receivedPendingNotifications: false,
legacy: {
phoneConnected: false
}
})
})
return {
...socket,
state,