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

Function _sendNotification

js/main.js:105–112  ·  view source on GitHub ↗

* Send a notification to all modules. * @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. * @param {Module} [sendTo] The (optional) module to send the notific

(notification, payload, sender, sendTo)

Source from the content-addressed store, hash-verified

103 * @param {Module} [sendTo] The (optional) module to send the notification to.
104 */
105function _sendNotification (notification, payload, sender, sendTo) {
106 for (const m in modules) {
107 const module = modules[m];
108 if (module !== sender && (!sendTo || module === sendTo)) {
109 module.notificationReceived(notification, payload, sender);
110 }
111 }
112}
113
114/**
115 * Update the dom for a specific module.

Callers 5

createDomObjectsFunction · 0.85
createModuleDomFunction · 0.85
modulesStartedFunction · 0.85
sendNotificationFunction · 0.85
updateDomFunction · 0.85

Calls 1

notificationReceivedMethod · 0.80

Tested by

no test coverage detected