Merge pull request #563 from kyraex/retain-creds

Retain existing authState.creds.me properties and add lid
This commit is contained in:
ShellTear
2024-01-03 00:13:21 +02:00
committed by GitHub

View File

@@ -630,7 +630,7 @@ export const makeSocket = (config: SocketConfig) => {
logger.info('opened connection to WA')
clearTimeout(qrTimer) // will never happen in all likelyhood -- but just in case WA sends success on first try
ev.emit('creds.update', { me: { id: authState.creds.me!.id, lid: node.attrs.lid } })
ev.emit('creds.update', { me: { ...authState.creds.me!, lid: node.attrs.lid } })
ev.emit('connection.update', { connection: 'open' })
})