mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: allow meId in getKeyAuthor
This commit is contained in:
@@ -41,8 +41,11 @@ export const BufferJSON = {
|
||||
}
|
||||
}
|
||||
|
||||
export const getKeyAuthor = (key: proto.IMessageKey | undefined | null) => (
|
||||
(key?.fromMe ? 'me' : key?.participant || key?.remoteJid) || ''
|
||||
export const getKeyAuthor = (
|
||||
key: proto.IMessageKey | undefined | null,
|
||||
meId: string = 'me'
|
||||
) => (
|
||||
(key?.fromMe ? meId : key?.participant || key?.remoteJid) || ''
|
||||
)
|
||||
|
||||
export const writeRandomPadMax16 = (msg: Uint8Array) => {
|
||||
|
||||
Reference in New Issue
Block a user