mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-09 01:49:37 -06:00
Merge pull request #2072 from nolramaf/fix/media-content-validation
fix/media content validation
This commit is contained in:
commit
37571c03b4
@ -3676,7 +3676,10 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
}
|
||||
}
|
||||
|
||||
if ('messageContextInfo' in msg.message && Object.keys(msg.message).length === 1) {
|
||||
if (
|
||||
Object.keys(msg.message).length === 1 &&
|
||||
Object.prototype.hasOwnProperty.call(msg.message, 'messageContextInfo')
|
||||
) {
|
||||
throw 'The message is messageContextInfo';
|
||||
}
|
||||
|
||||
|
||||
@ -826,7 +826,7 @@ export class ChannelStartupService {
|
||||
const msg = message.message;
|
||||
|
||||
// Se só tem messageContextInfo, não é mídia válida
|
||||
if (Object.keys(msg).length === 1 && 'messageContextInfo' in msg) {
|
||||
if (Object.keys(msg).length === 1 && Object.prototype.hasOwnProperty.call(msg, 'messageContextInfo')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user