@xuda.io/notification_module 1.1.28 → 1.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -107,10 +107,9 @@ exports.submit_notification = async function (
|
|
|
107
107
|
// return { code: -1, data: "error: uid is mandatory field" };
|
|
108
108
|
// }
|
|
109
109
|
|
|
110
|
-
const notification_categories=await import(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
const notification_categories = await import(
|
|
111
|
+
path.join(process.env.XUDA_HOME, "notification_templates.mjs")
|
|
112
|
+
);
|
|
114
113
|
|
|
115
114
|
var icon = "https://dev.xuda.io/dist/images/xuda_ico.png";
|
|
116
115
|
if (app_id) {
|
|
@@ -129,7 +128,7 @@ const notification_categories=await import(path.join(
|
|
|
129
128
|
}
|
|
130
129
|
|
|
131
130
|
if (topic) {
|
|
132
|
-
const _topic =
|
|
131
|
+
const _topic = notification_categories?.[type]?.topics?.[topic];
|
|
133
132
|
if (_topic) {
|
|
134
133
|
subject = _.template(_topic.subject)(params);
|
|
135
134
|
delivery_method = _topic.delivery_method;
|
|
@@ -656,8 +655,3 @@ exports.get_system_notifications = async function (req) {
|
|
|
656
655
|
req.read = false;
|
|
657
656
|
return await module.exports.get_notifications(req);
|
|
658
657
|
};
|
|
659
|
-
|
|
660
|
-
setTimeout(async () => {
|
|
661
|
-
const aa = await import("/var/xuda/notification_templates.mjs");
|
|
662
|
-
console.log(aa);
|
|
663
|
-
}, 1000);
|