feat: handle encrypt notification
This commit is contained in:
@@ -244,9 +244,9 @@ export const makeSocket = ({
|
||||
ev.emit('creds.update', update)
|
||||
}
|
||||
|
||||
/** generates and uploads a set of pre-keys */
|
||||
const uploadPreKeys = async() => {
|
||||
await assertingPreKeys(INITIAL_PREKEY_COUNT, async preKeys => {
|
||||
/** generates and uploads a set of pre-keys to the server */
|
||||
const uploadPreKeys = async(count = INITIAL_PREKEY_COUNT) => {
|
||||
await assertingPreKeys(count, async preKeys => {
|
||||
const node: BinaryNode = {
|
||||
tag: 'iq',
|
||||
attrs: {
|
||||
@@ -602,6 +602,7 @@ export const makeSocket = ({
|
||||
logout,
|
||||
end,
|
||||
onUnexpectedError,
|
||||
uploadPreKeys,
|
||||
/** Waits for the connection to WA to reach a state */
|
||||
waitForConnectionUpdate: bindWaitForConnectionUpdate(ev)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user