privacy setting returns correctly

This commit is contained in:
Adhiraj Singh
2021-09-26 22:36:28 +05:30
parent 91bbab54c4
commit 7b7fcafb03

View File

@@ -155,9 +155,19 @@ export const makeChatsSocket = (config: SocketConfig) => {
xmlns: 'privacy', xmlns: 'privacy',
to: S_WHATSAPP_NET, to: S_WHATSAPP_NET,
type: 'get' type: 'get'
} },
content: [
{ tag: 'privacy', attrs: { } }
]
}) })
console.log('privacy', result) const nodes = getBinaryNodeChildren(result, 'category')
const settings = nodes.reduce(
(dict, { attrs }) => {
dict[attrs.name] = attrs.value
return dict
}, { } as { [_: string]: string }
)
return settings
} }
const updateAccountSyncTimestamp = async() => { const updateAccountSyncTimestamp = async() => {