Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
4 tasks done
SimoneMSR opened this issue Mar 5, 2025 · 0 comments
Open
4 tasks done

Comments

@SimoneMSR
Copy link

SimoneMSR commented Mar 5, 2025

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant