mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Merge pull request #504 from cristiano-linvix/master
fix: fix message content type detection
This commit is contained in:
@@ -651,7 +651,7 @@ export const generateWAMessage = async(
|
||||
export const getContentType = (content: WAProto.IMessage | undefined) => {
|
||||
if(content) {
|
||||
const keys = Object.keys(content)
|
||||
const key = keys.find(k => (k === 'conversation' || k.endsWith('Message')) && k !== 'senderKeyDistributionMessage')
|
||||
const key = keys.find(k => (k === 'conversation' || k.includes('Message')) && k !== 'senderKeyDistributionMessage')
|
||||
return key as keyof typeof content
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user