feat: implement external patch parsing + app state sync on login

This commit is contained in:
Adhiraj Singh
2021-11-08 15:07:25 +05:30
parent 3c6edde1d6
commit ba453a588b
6 changed files with 88 additions and 86 deletions

View File

@@ -16,9 +16,11 @@ import { hkdf } from './crypto'
import { DEFAULT_ORIGIN } from '../Defaults'
export const hkdfInfoKey = (type: MediaType) => {
if(type === 'sticker') type = 'image'
let str: string = type
if(type === 'sticker') str = 'image'
if(type === 'md-app-state') str = 'App State'
let hkdfInfo = type[0].toUpperCase() + type.slice(1)
let hkdfInfo = str[0].toUpperCase() + str.slice(1)
return `WhatsApp ${hkdfInfo} Keys`
}
/** generates all the keys required to encrypt/decrypt & sign a media message */