From 65b40b729ca5d7f2406dd7b986aff264754c0a04 Mon Sep 17 00:00:00 2001 From: Naz Date: Wed, 16 Mar 2022 13:59:04 +0800 Subject: [PATCH] Quick workaround to an error --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fa036f8..28351f9 100644 --- a/index.js +++ b/index.js @@ -76,7 +76,7 @@ module.exports = class NotificationSounds extends Plugin { inject('ns-showNotificationPre', showNotification, 'showNotification', (args) => { if (args.length >= 4) { const info = args[3]; - if (info.sound.startsWith('message') && this.custom['message1']) { + if (!!info.sound && info.sound.startsWith('message') && this.custom['message1'] && !info.isReplacedByNSC) { return [ args[0], args[1], args[2], Object.assign(info, { playSoundIfDisabled: false, sound: null, isReplacedByNSC: true }) ]; } }