mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: better registration ID
This commit is contained in:
@@ -184,7 +184,7 @@ export const makeSocket = ({
|
|||||||
}
|
}
|
||||||
helloMsg = proto.HandshakeMessage.fromObject(helloMsg)
|
helloMsg = proto.HandshakeMessage.fromObject(helloMsg)
|
||||||
|
|
||||||
logger.info({ browser, helloMsg }, 'connected to WA Web')
|
logger.info({ browser, helloMsg, registrationId: creds.registrationId }, 'connected to WA Web')
|
||||||
|
|
||||||
const init = proto.HandshakeMessage.encode(helloMsg).finish()
|
const init = proto.HandshakeMessage.encode(helloMsg).finish()
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export const encodeWAMessage = (message: proto.IMessage) => (
|
|||||||
)
|
)
|
||||||
|
|
||||||
export const generateRegistrationId = () => (
|
export const generateRegistrationId = () => (
|
||||||
Uint16Array.from(randomBytes(2))[0] & 0x3fff
|
Uint16Array.from(randomBytes(2))[0]
|
||||||
)
|
)
|
||||||
|
|
||||||
export const encodeInt = (e: number, t: number) => {
|
export const encodeInt = (e: number, t: number) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user