mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: log proto objects to prevent buffer arrays being printed
This commit is contained in:
@@ -176,9 +176,10 @@ export const makeSocket = ({
|
|||||||
|
|
||||||
/** connection handshake */
|
/** connection handshake */
|
||||||
const validateConnection = async() => {
|
const validateConnection = async() => {
|
||||||
const helloMsg: proto.IHandshakeMessage = {
|
let helloMsg: proto.IHandshakeMessage = {
|
||||||
clientHello: { ephemeral: ephemeralKeyPair.public }
|
clientHello: { ephemeral: ephemeralKeyPair.public }
|
||||||
}
|
}
|
||||||
|
helloMsg = proto.HandshakeMessage.fromObject(helloMsg)
|
||||||
|
|
||||||
logger.info({ browser, helloMsg }, 'connected to WA Web')
|
logger.info({ browser, helloMsg }, 'connected to WA Web')
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export const generateLoginNode = (userJid: string, config: ClientPayloadConfig):
|
|||||||
username: +user,
|
username: +user,
|
||||||
device: device,
|
device: device,
|
||||||
}
|
}
|
||||||
return payload
|
return proto.ClientPayload.fromObject(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateRegistrationNode = (
|
export const generateRegistrationNode = (
|
||||||
@@ -89,7 +89,7 @@ export const generateRegistrationNode = (
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return registerPayload
|
return proto.ClientPayload.fromObject(registerPayload)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const configureSuccessfulPairing = (
|
export const configureSuccessfulPairing = (
|
||||||
|
|||||||
Reference in New Issue
Block a user