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
parent
e30573519d
commit
2bb5db92d7
|
@ -184,13 +184,11 @@ 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" &&
|
|
||||||
getSettingValue("blockAudioVideoMedia")?.value === "enabled")
|
|
||||||
) {
|
|
||||||
mediaAuthorized = false;
|
mediaAuthorized = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (msg?.fromMe) {
|
if (msg?.fromMe) {
|
||||||
messageData = { ...messageData, fromAgent: true };
|
messageData = { ...messageData, fromAgent: true };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue