feat: allow messageSecret as param to poll create

This commit is contained in:
Adhiraj Singh
2023-03-02 17:42:34 +05:30
parent 7d5aca54e9
commit cd42881201
3 changed files with 24 additions and 72 deletions

View File

@@ -41,6 +41,10 @@ export const BufferJSON = {
}
}
export const getKeyAuthor = (key: proto.IMessageKey | undefined | null) => (
(key?.fromMe ? 'me' : key?.participant || key?.remoteJid) || ''
)
export const writeRandomPadMax16 = (msg: Uint8Array) => {
const pad = randomBytes(1)
pad[0] &= 0xf