fix: resolve issue with blocking audio and video without the option being active

Details:
- Fixed the problem where audio and video were being blocked even when the option was not active.
merge-socket
gustavo-gsp 2024-06-27 14:10:26 -03:00
parent e30573519d
commit 2bb5db92d7
1 changed files with 4 additions and 6 deletions

View File

@ -184,12 +184,10 @@ const verifyMediaMessage = async (
phoneNumberId: msg?.phoneNumberId, phoneNumberId: msg?.phoneNumberId,
fromAgent: false fromAgent: false
}; };
if ( if(getSettingValue('blockAudioVideoMedia')?.value === 'enabled'){
messageData.mediaType === "video" || if( messageData.mediaType === 'video' || messageData.mediaType === 'audio' ){
(messageData.mediaType === "audio" && mediaAuthorized = false;
getSettingValue("blockAudioVideoMedia")?.value === "enabled") }
) {
mediaAuthorized = false;
} }
if (msg?.fromMe) { if (msg?.fromMe) {
messageData = { ...messageData, fromAgent: true }; messageData = { ...messageData, fromAgent: true };