Skip to content

Commit

Permalink
fix(master): Fixes prop hash reset due to missing property in the res…
Browse files Browse the repository at this point in the history
…ponse
  • Loading branch information
purpshell authored Oct 7, 2024
1 parent 47b2f6d commit bf578c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Socket/chats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand Down

0 comments on commit bf578c7

Please sign in to comment.