@xuda.io/notification_module 1.1.109 → 1.1.111

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.mjs +10 -9
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -62,13 +62,13 @@ export const update_notification_status = async (req) => {
62
62
  });
63
63
  return await db_module.save_couch_doc('xuda_notification', notification_doc);
64
64
  };
65
- //= global[`_notification_module_ch`]
66
- export const submit_notification = async (req, _ch) => {
65
+ //, _ch= global[`_notification_module_ch`]
66
+ export const submit_notification = async (req) => {
67
67
  let { type, app_id, to_app_id, uid_arr, subject = '', body = '', delivery_method = [], display_type = 'info', ref, email, sender_uid, system, topic, params } = req;
68
68
  let obj = {};
69
69
  const { notification_categories } = await import(path.join(process.env.XUDA_HOME, 'notification_templates.mjs'));
70
70
 
71
- let icon = 'https://dev.xuda.io/dist/images/xuda_ico.png';
71
+ let icon = 'https://dev.xuda.ai/dist/images/xuda_ico.png';
72
72
  if (app_id) {
73
73
  const app_id_reference = await _common.get_project_app_id(app_id, true);
74
74
  const app_ret = await db_module.get_couch_doc('xuda_master', app_id_reference);
@@ -505,7 +505,8 @@ export const update_system_notification = async (req) => {
505
505
  return await db_module.save_couch_doc('xuda_notification', notification_doc);
506
506
  };
507
507
 
508
- export const submit_topic_app_notification = async (req, _ch) => {
508
+ export const submit_topic_app_notification = async (req) => {
509
+ //, _ch
509
510
  const { uid, topic, to_uid = [], to_app_id, app_id, system, type, params } = req;
510
511
  try {
511
512
  if (!_.isArray(to_uid)) {
@@ -542,7 +543,7 @@ export const submit_topic_app_notification = async (req, _ch) => {
542
543
  params,
543
544
  };
544
545
 
545
- return submit_notification(msg_obj, _ch);
546
+ return submit_notification(msg_obj); //, _ch
546
547
  } catch (err) {
547
548
  return { code: -1, data: err.message };
548
549
  }
@@ -606,10 +607,10 @@ export const notifications_validation_fx = async (notification_id) => {
606
607
  // // params: {
607
608
  // // name: name,
608
609
  // // ip: ip,
609
- // // dashboard_url: `https://xuda.io/dashboard/project/${app_id}/admin/overview`,
610
- // // dashboard_ssh_url: `https://xuda.io/dashboard/project/${app_id}/admin/overview`,
611
- // // dashboard_ssh_assign_url: `https://xuda.io/dashboard/settings/ssh_keys`,
612
- // // support_url: `https://xuda.io/schedule/sales?topic=Sales&subtopic=General+Inquiries`,
610
+ // // dashboard_url: `https://xuda.ai/dashboard/project/${app_id}/admin/overview`,
611
+ // // dashboard_ssh_url: `https://xuda.ai/dashboard/project/${app_id}/admin/overview`,
612
+ // // dashboard_ssh_assign_url: `https://xuda.ai/dashboard/settings/ssh_keys`,
613
+ // // support_url: `https://xuda.ai/schedule/sales?topic=Sales&subtopic=General+Inquiries`,
613
614
  // // },
614
615
  // // ref: null,
615
616
  // // email: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/notification_module",
3
- "version": "1.1.109",
3
+ "version": "1.1.111",
4
4
  "description": "Xuda Notification Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {