MCPcopy
hub / github.com/MagicMirrorOrg/MagicMirror / notificationReceived

Method notificationReceived

js/module.js:149–155  ·  view source on GitHub ↗

* Called by the MagicMirror² core when a notification arrives. * @param {string} notification The identifier of the notification. * @param {object} payload The payload of the notification. * @param {Module} sender The module that sent the notification.

(notification, payload, sender)

Source from the content-addressed store, hash-verified

147 * @param {Module} sender The module that sent the notification.
148 */
149 notificationReceived (notification, payload, sender) {
150 if (sender) {
151 Log.debug(`${this.name} received a module notification: ${notification} from sender: ${sender.name}`);
152 } else {
153 Log.debug(`${this.name} received a system notification: ${notification}`);
154 }
155 }
156
157 /**
158 * Returns the nunjucks environment for the current module.

Callers 3

_sendNotificationFunction · 0.80
notifyFunction · 0.80
newsfeed_spec.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected