From ebba86bc089dd1739b117394b6d649e7e9b38605 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Mon, 18 Oct 2021 18:22:58 -0400 Subject: [PATCH] Fixed issue with notification sounds not working correctly (#1818) --- src/main/notifications/Mention.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/notifications/Mention.ts b/src/main/notifications/Mention.ts index f200f0b7..d77906fa 100644 --- a/src/main/notifications/Mention.ts +++ b/src/main/notifications/Mention.ts @@ -20,22 +20,22 @@ const defaultOptions = { export const DEFAULT_WIN7 = 'Ding'; export class Mention extends Notification { - customSound: boolean; + customSound: string; channel: {id: string}; // TODO: Channel from mattermost-redux teamId: string; constructor(customOptions: MentionOptions, channel: {id: string}, teamId: string) { - super({...defaultOptions, ...customOptions}); const options = {...defaultOptions, ...customOptions}; if (process.platform === 'darwin') { // Notification Center shows app's icon, so there were two icons on the notification. Reflect.deleteProperty(options, 'icon'); } const isWin7 = (process.platform === 'win32' && osVersion.isLowerThanOrEqualWindows8_1() && DEFAULT_WIN7); - const customSound = Boolean(!options.silent && ((options.data && options.data.soundName !== 'None' && options.data.soundName) || isWin7)); + const customSound = String(!options.silent && ((options.data && options.data.soundName !== 'None' && options.data.soundName) || isWin7)); if (customSound) { options.silent = true; } + super(options); this.customSound = customSound; this.channel = channel;