Skip to content

Commit 56d0bec

Browse files
committed
Add tag for createmodule and notifications
1 parent a00bd58 commit 56d0bec

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

MagicMirror-Module-Template.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* {{LICENSE}} Licensed.
88
*/
99

10-
Module.register("MagicMirror-Module-Template", {
10+
Module.register("{{MODULE_NAME}}", {
1111
defaults: {
1212
updateInterval: 60000,
1313
retryDelay: 5000
@@ -127,12 +127,12 @@ Module.register("MagicMirror-Module-Template", {
127127

128128
// the data if load
129129
// send notification to helper
130-
this.sendSocketNotification("NOTIFICATION_TEST", data);
130+
this.sendSocketNotification("{{MODULE_NAME}}-NOTIFICATION_TEST", data);
131131
},
132132

133133
// socketNotificationReceived from helper
134134
socketNotificationReceived: function (notification, payload) {
135-
if(notification === "NOTIFICATION_TEST") {
135+
if(notification === "{{MODULE_NAME}}-NOTIFICATION_TEST") {
136136
// set dataNotification
137137
this.dataNotification = payload;
138138
this.updateDom();

node_helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = NodeHelper.create({
1818
* argument payload mixed - The payload of the notification.
1919
*/
2020
socketNotificationReceived: function(notification, payload) {
21-
if (notification === "NOTIFICATION_TEST") {
21+
if (notification === "{{MODULE_NAME}}-NOTIFICATION_TEST") {
2222
console.log("Working notification system. Notification:", notification, "payload: ", payload);
2323
// Send notification
2424
this.sendNotificationTest(this.anotherFunction()); //Is possible send objects :)
@@ -27,7 +27,7 @@ module.exports = NodeHelper.create({
2727

2828
// Example function send notification test
2929
sendNotificationTest: function(payload) {
30-
this.sendSocketNotification("NOTIFICATION_TEST", payload);
30+
this.sendSocketNotification("{{MODULE_NAME}}-NOTIFICATION_TEST", payload);
3131
},
3232

3333
// this you can create extra routes for your module

0 commit comments

Comments
 (0)