mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-12 19:39:36 -06:00
fix/media content validation
This commit is contained in:
parent
0976109d27
commit
b0d261b305
@ -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';
|
throw 'The message is messageContextInfo';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -826,7 +826,7 @@ export class ChannelStartupService {
|
|||||||
const msg = message.message;
|
const msg = message.message;
|
||||||
|
|
||||||
// Se só tem messageContextInfo, não é mídia válida
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user