[MM-29921] fix custom sound not playing when receiving a notification (#1396)

* [MM-29921] fix sound notification

* remove logs
This commit is contained in:
Guillermo Vayá
2020-10-24 00:07:34 +02:00
committed by GitHub
parent 427c16b701
commit 732427a3fe

View File

@@ -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;