fix(master): Fixes prop hash reset due to missing property in the response

This commit is contained in:
Rajeh Taher
2024-10-07 21:26:32 +03:00
committed by GitHub
parent 47b2f6dd41
commit bf578c79e7

View File

@@ -773,8 +773,10 @@ export const makeChatsSocket = (config: SocketConfig) => {
let props: { [_: string]: string } = {}
if(propsNode) {
authState.creds.lastPropHash = propsNode?.attrs?.hash
ev.emit('creds.update', authState.creds)
if(propsNode.attrs?.hash) { // on some clients, the hash is returning as undefined
authState.creds.lastPropHash = propsNode?.attrs?.hash
ev.emit('creds.update', authState.creds)
}
props = reduceBinaryNodeToDictionary(propsNode, 'prop')
}