fix: better registration ID

This commit is contained in:
Adhiraj Singh
2022-04-12 19:02:30 +05:30
parent 75c637cf6c
commit 37178547ba
2 changed files with 2 additions and 2 deletions

View File

@@ -184,7 +184,7 @@ export const makeSocket = ({
}
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()

View File

@@ -76,7 +76,7 @@ export const encodeWAMessage = (message: proto.IMessage) => (
)
export const generateRegistrationId = () => (
Uint16Array.from(randomBytes(2))[0] & 0x3fff
Uint16Array.from(randomBytes(2))[0]
)
export const encodeInt = (e: number, t: number) => {