diff --git a/src/Defaults/index.ts b/src/Defaults/index.ts index 06ea237b..1c55f678 100644 --- a/src/Defaults/index.ts +++ b/src/Defaults/index.ts @@ -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 KEY_BUNDLE_TYPE = '' +export const KEY_BUNDLE_TYPE = Buffer.from([5]) diff --git a/src/Socket/chats.ts b/src/Socket/chats.ts index 5b30f43c..3e9c45ea 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -680,11 +680,12 @@ export const makeChatsSocket = (config: SocketConfig) => { ev.on('connection.update', ({ connection }) => { if(connection === 'open') { - sendPresenceUpdate('available') - fetchBlocklist() - fetchPrivacySettings() fetchAbt() fetchProps() + fetchBlocklist() + fetchPrivacySettings() + + sendPresenceUpdate('available') } }) diff --git a/src/Socket/socket.ts b/src/Socket/socket.ts index 1d3df076..6303eb77 100644 --- a/src/Socket/socket.ts +++ b/src/Socket/socket.ts @@ -401,7 +401,7 @@ export const makeSocket = ({ { tag: 'remove-companion-device', attrs: { - jid: jid, + jid, reason: 'user_initiated' } } diff --git a/src/Utils/validate-connection.ts b/src/Utils/validate-connection.ts index 3ba48dc8..9f366222 100644 --- a/src/Utils/validate-connection.ts +++ b/src/Utils/validate-connection.ts @@ -139,7 +139,11 @@ export const configureSuccessfulPairing = ( tag: 'pair-device-sign', attrs: { }, content: [ - { tag: 'device-identity', attrs: { 'key-index': `${keyIndex}` }, content: accountEnc } + { + tag: 'device-identity', + attrs: { 'key-index': `${keyIndex}` }, + content: accountEnc + } ] } ]