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 = () => {
|
export const generateRegistrationId = (): number => {
|
||||||
const buff = randomBytes(4)
|
return Uint16Array.from(randomBytes(2))[0] & 16383
|
||||||
return buff.readUInt32BE()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const encodeBigEndian = (e: number, t = 4) => {
|
export const encodeBigEndian = (e: number, t = 4) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user