chore: use only numbers in message tag

This commit is contained in:
Adhiraj Singh
2022-04-12 17:04:24 +05:30
parent d43e5e0a01
commit f4da9af5d3
2 changed files with 8 additions and 3 deletions

View File

@@ -255,6 +255,12 @@ export const fetchLatestBaileysVersion = async() => {
}
}
/** unique message tag prefix for MD clients */
export const generateMdTagPrefix = () => {
const bytes = randomBytes(2)
return `${bytes[0]}.${bytes[1]}-`
}
const STATUS_MAP: { [_: string]: proto.WebMessageInfo.WebMessageInfoStatus } = {
'played': proto.WebMessageInfo.WebMessageInfoStatus.PLAYED,
'read': proto.WebMessageInfo.WebMessageInfoStatus.READ,