From 3e50ed1bc2a119c56eda9dd9f122308ed90bb185 Mon Sep 17 00:00:00 2001 From: Piotr Rajnisz Date: Sun, 15 Jan 2023 23:44:53 +0100 Subject: [PATCH 1/2] Add templateName parameter --- modules/default/alert/alert.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/default/alert/alert.js b/modules/default/alert/alert.js index 76bacc0248..c2a68f7524 100644 --- a/modules/default/alert/alert.js +++ b/modules/default/alert/alert.js @@ -69,7 +69,7 @@ Module.register("alert", { }, async showNotification(notification) { - const message = await this.renderMessage("notification", notification); + const message = await this.renderMessage(notification.templateName || "notification", notification); new NotificationFx({ message, @@ -90,7 +90,7 @@ Module.register("alert", { this.toggleBlur(true); } - const message = await this.renderMessage("alert", alert); + const message = await this.renderMessage(alert.templateName || "alert", alert); // Store alert in this.alerts this.alerts[sender.name] = new NotificationFx({ From b33c0ab8de010fe56abaf94f7caa84154769b6ce Mon Sep 17 00:00:00 2001 From: Piotr Rajnisz Date: Mon, 16 Jan 2023 00:13:34 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 437f75bf1b..4564a5da7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ _This release is scheduled to be released on 2023-04-01._ - Added tests for hourly weather forecast - Added possibility to ignore MagicMirror repo in updatenotification module - Added Pirate Weather as new weather provider (#3005) +- Added possibility to use your own templates in Alert module ### Removed