MagicMirrorOrg / MagicMirror

MagicMirror² is an open source modular smart mirror platform. With a growing list of installable modules, the MagicMirror² allows you to convert your hallway or bathroom mirror into your personal assistant.
http://magicmirror.builders
MIT License
19.33k stars 4.15k forks source link

PR 2881 extended calendar to receive notifications from other modules, but code in wrong place #3443

Open sdetweil opened 3 weeks ago

sdetweil commented 3 weeks ago

the pr 2881 (august 22)

added this code

    socketNotificationReceived (notification, payload) {

        if (notification === "FETCH_CALENDAR") {  
            this.sendSocketNotification(notification, { url: payload.url, id: this.identifier });
        }

BUT the module CANNOT receive SOCKET notifications except from our helper, which NEVER sends this

instead is should have been added to a NEW function . responsible for incoming notifications from OTHER modules

     notificationReceived (notification, payload, sender) {

        if (notification === "FETCH_CALENDAR") {  
            this.sendSocketNotification(notification, { url: payload.url, id: this.identifier });
        }
      },