@xuda.io/notification_module 1.1.99 → 1.1.101

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 +8 -25
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -154,18 +154,10 @@ export const submit_notification = async (req, _ch = global[`_notification_modul
154
154
  case 'banner':
155
155
  case 'consent':
156
156
  case 'alert':
157
- _ch.sendToQueue(
158
- 'ws_dashboard_module',
159
- Buffer.from(
160
- JSON.stringify({
161
- method: 'notification',
162
- data: {
163
- to: uid,
164
- data: obj,
165
- },
166
- }),
167
- ),
168
- );
157
+ ws_dashboard_ms.notification({
158
+ to: uid,
159
+ data: obj,
160
+ });
169
161
 
170
162
  break;
171
163
  case 'push':
@@ -503,19 +495,10 @@ export const update_system_notification = async (req) => {
503
495
  notification_doc.type = type;
504
496
  }
505
497
 
506
- global[`_notification_module_ch`].sendToQueue(
507
- 'ws_dashboard_module',
508
- Buffer.from(
509
- JSON.stringify({
510
- method: 'notification',
511
-
512
- data: {
513
- to: notification_doc.system ? uid : notification_doc.uid,
514
- data: notification_doc,
515
- },
516
- }),
517
- ),
518
- );
498
+ ws_dashboard_ms.notification({
499
+ to: notification_doc.system ? uid : notification_doc.uid,
500
+ data: notification_doc,
501
+ });
519
502
 
520
503
  return await db_module.save_couch_doc('xuda_notification', notification_doc);
521
504
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/notification_module",
3
- "version": "1.1.99",
3
+ "version": "1.1.101",
4
4
  "description": "Xuda Notification Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {