Update Utils.ts

This commit is contained in:
Adhiraj
2020-10-05 12:04:53 +05:30
parent 6560fc1756
commit 526f5d9168

View File

@@ -30,7 +30,7 @@ export const waChatKey = (pin: boolean) => ({
compare: (k1: string, k2: string) => k2.localeCompare (k1)
})
export const waMessageKey = {
key: (m: WAMessage) => toNumber (m.messageTimestamp).toString(16) + (10000 + (m['epoch'] || 0)).toString(16),
key: (m: WAMessage) => toNumber (m.messageTimestamp).toString(16).padStart(8, '0') + (5000 + (m['epoch'] || 0)).toString(16),
compare: (k1: string, k2: string) => k1.localeCompare (k2)
}
export const WA_MESSAGE_ID = (m: WAMessage) => GET_MESSAGE_ID (m.key)