feat: allow meId in getKeyAuthor

This commit is contained in:
Adhiraj Singh
2023-03-02 18:46:07 +05:30
parent d98d4156fe
commit bda2bb4717

View File

@@ -41,8 +41,11 @@ export const BufferJSON = {
} }
} }
export const getKeyAuthor = (key: proto.IMessageKey | undefined | null) => ( export const getKeyAuthor = (
(key?.fromMe ? 'me' : key?.participant || key?.remoteJid) || '' key: proto.IMessageKey | undefined | null,
meId: string = 'me'
) => (
(key?.fromMe ? meId : key?.participant || key?.remoteJid) || ''
) )
export const writeRandomPadMax16 = (msg: Uint8Array) => { export const writeRandomPadMax16 = (msg: Uint8Array) => {