From 732427a3fec08f0972da57aa168b2272931dea5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Vay=C3=A1?= Date: Sat, 24 Oct 2020 00:07:34 +0200 Subject: [PATCH] [MM-29921] fix custom sound not playing when receiving a notification (#1396) * [MM-29921] fix sound notification * remove logs --- src/browser/js/notification.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/browser/js/notification.js b/src/browser/js/notification.js index f9585229..51012530 100644 --- a/src/browser/js/notification.js +++ b/src/browser/js/notification.js @@ -46,7 +46,8 @@ export default class EnhancedNotification extends OriginalNotification { } const isWin7 = (process.platform === 'win32' && osVersion.isLowerThanOrEqualWindows8_1() && DEFAULT_WIN7); - const customSound = !options.silent && ((options.data && options.data.soundName && options.data.soundName !== 'None') || isWin7); + const customSound = !options.silent && ((options.data && options.data.soundName !== 'None' && options.data.soundName) || isWin7); + if (customSound) { // disable native sound options.silent = true;