FIX: add support for custom/plugin notification title attribute

FIX: add support for custom/plugin notification title attribute

diff --git a/app/assets/javascripts/discourse/widgets/notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/notification-item.js.es6
index eac0c6e..52d51ab 100644
--- a/app/assets/javascripts/discourse/widgets/notification-item.js.es6
+++ b/app/assets/javascripts/discourse/widgets/notification-item.js.es6
@@ -159,7 +159,11 @@ createWidget("notification-item", {
     let title;
 
     if (notificationName) {
-      title = I18n.t(`notifications.titles.${notificationName}`);
+      if (notificationName === "custom") {
+        title = data.title ? I18n.t(data.title) : "";
+      } else {
+        title = I18n.t(`notifications.titles.${notificationName}`);
+      }
     } else {
       title = "";
     }

GitHub sha: 9db1fef4

1 Like