mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: add desktop + full history sync opts
This commit is contained in:
@@ -25,6 +25,7 @@ export const makeSocket = ({
|
||||
auth: authState,
|
||||
printQRInTerminal,
|
||||
defaultQueryTimeoutMs,
|
||||
syncFullHistory,
|
||||
transactionOpts
|
||||
}: SocketConfig) => {
|
||||
const ws = new WebSocket(waWebSocketUrl, undefined, {
|
||||
@@ -178,12 +179,14 @@ export const makeSocket = ({
|
||||
|
||||
const keyEnc = noise.processHandshake(handshake, creds.noiseKey)
|
||||
|
||||
const config = { version, browser, syncFullHistory }
|
||||
|
||||
let node: proto.IClientPayload
|
||||
if(!creds.me) {
|
||||
node = generateRegistrationNode(creds, { version, browser })
|
||||
node = generateRegistrationNode(creds, config)
|
||||
logger.info({ node }, 'not logged in, attempting registration...')
|
||||
} else {
|
||||
node = generateLoginNode(creds.me!.id, { version, browser })
|
||||
node = generateLoginNode(creds.me!.id, config)
|
||||
logger.info({ node }, 'logging in...')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user