chore: minor code cleanup

This commit is contained in:
Adhiraj Singh
2022-03-14 19:38:01 +05:30
parent 1c77c00be5
commit 2b10b7b18f
4 changed files with 11 additions and 6 deletions

View File

@@ -57,4 +57,4 @@ export const MEDIA_PATH_MAP: { [T in MediaType]: string } = {
export const MEDIA_KEYS = Object.keys(MEDIA_PATH_MAP) as MediaType[] export const MEDIA_KEYS = Object.keys(MEDIA_PATH_MAP) as MediaType[]
export const KEY_BUNDLE_TYPE = '' export const KEY_BUNDLE_TYPE = Buffer.from([5])

View File

@@ -680,11 +680,12 @@ export const makeChatsSocket = (config: SocketConfig) => {
ev.on('connection.update', ({ connection }) => { ev.on('connection.update', ({ connection }) => {
if(connection === 'open') { if(connection === 'open') {
sendPresenceUpdate('available')
fetchBlocklist()
fetchPrivacySettings()
fetchAbt() fetchAbt()
fetchProps() fetchProps()
fetchBlocklist()
fetchPrivacySettings()
sendPresenceUpdate('available')
} }
}) })

View File

@@ -401,7 +401,7 @@ export const makeSocket = ({
{ {
tag: 'remove-companion-device', tag: 'remove-companion-device',
attrs: { attrs: {
jid: jid, jid,
reason: 'user_initiated' reason: 'user_initiated'
} }
} }

View File

@@ -139,7 +139,11 @@ export const configureSuccessfulPairing = (
tag: 'pair-device-sign', tag: 'pair-device-sign',
attrs: { }, attrs: { },
content: [ content: [
{ tag: 'device-identity', attrs: { 'key-index': `${keyIndex}` }, content: accountEnc } {
tag: 'device-identity',
attrs: { 'key-index': `${keyIndex}` },
content: accountEnc
}
] ]
} }
] ]