Trying to capture notifications for a module, can anyone tell me what’s wrong with this mai js, my objective for now is to capture the SHOW_ALERT notification and print it in the console log. Here is the mainjs
Module.register("MMM-11-TTS", {
start: function() {
console.log(`Starting module: ${this.name}`);
},
notificationReceived: function(notification, payload) {
if (notification === 'SHOW_ALERT') {
console.log(`Received notification: ${notification}`);
console.log(`Payload: ${payload}`);
}
}
});