Skip to content

[Feature Request] {{ Calendar: send module notification for CALENDAR_ERROR message}} #3735

@SimoneMSR

Description

@SimoneMSR

Prerequisites

  • I am running the latest version of MagicMirror², and know that this feature is not available now.
  • I know my issue is not related to a third-party module.
  • I have searched for existing issues that already include this feature request, without success.

Describe the Feature Request

I would like the calendar module to have this feature. Whenever there is a socketNotificationReceived with CALENDAR_ERROR, the calendar module should broadcast the notification to all MM modules

Describe the Use Case

In this way any MM module could be aware of calendar errors and, say, reload the page each time the calendar failed the fetch

Describe Preferred Solution

in calendar.js

socketNotificationReceived (notification, payload) {
...
  } else if (notification === "CALENDAR_ERROR") {
  	let error_message = this.translate(payload.error_type);
  	this.error = this.translate("MODULE_CONFIG_ERROR", { MODULE_NAME: this.name, ERROR: error_message });
  	this.loaded = true;
        this.sendNotification("CALENDAR_ERROR", payload); // <------------- NEW CODE
}

Describe Alternatives

No response

Related Code

calendar.js

Additional Information

No response

Participation

  • I am willing to submit a pull request for this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions