Skip to content

Commit

Permalink
Quick workaround to an error
Browse files Browse the repository at this point in the history
  • Loading branch information
BluSpring committed Mar 16, 2022
1 parent ef1a39d commit 65b40b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) ];
}
}
Expand Down

0 comments on commit 65b40b7

Please sign in to comment.