mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: use new registrationId function
This commit is contained in:
@@ -70,9 +70,8 @@ export const encodeWAMessage = (message: proto.IMessage) => (
|
||||
)
|
||||
)
|
||||
|
||||
export const generateRegistrationId = () => {
|
||||
const buff = randomBytes(4)
|
||||
return buff.readUInt32BE()
|
||||
export const generateRegistrationId = (): number => {
|
||||
return Uint16Array.from(randomBytes(2))[0] & 16383
|
||||
}
|
||||
|
||||
export const encodeBigEndian = (e: number, t = 4) => {
|
||||
|
||||
Reference in New Issue
Block a user