@xuda.io/notification_module 1.1.79 → 1.1.81

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.
Files changed (2) hide show
  1. package/index.js +7 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -88,10 +88,14 @@ exports.submit_notification = async function (req, _ch = global[`_notification_m
88
88
  if (topic) {
89
89
  const _topic = notification_categories?.[type]?.topics?.[topic];
90
90
  if (_topic) {
91
- subject = _.template(_topic.subject)(params);
91
+ if (!subject) {
92
+ subject = _.template(_topic.subject)(params);
93
+ }
92
94
  delivery_method = _topic.delivery_method;
93
95
  display_type = _topic.display_type;
94
- body = _.template(_topic.body)(params);
96
+ if (!body) {
97
+ body = _.template(_topic.body)(params);
98
+ }
95
99
  } else {
96
100
  return {
97
101
  code: -1,
@@ -148,7 +152,7 @@ exports.submit_notification = async function (req, _ch = global[`_notification_m
148
152
  subject,
149
153
  body,
150
154
  ref: obj._id,
151
- app_id: obj.pp_id,
155
+ app_id: obj.app_id,
152
156
  });
153
157
  break;
154
158
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/notification_module",
3
- "version": "1.1.79",
3
+ "version": "1.1.81",
4
4
  "description": "Xuda Notification Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {