@xuda.io/notification_module 1.1.55 → 1.1.57
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 +7 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -708,7 +708,7 @@ exports.notifications_validation_fx = async function (notification_id) {
|
|
|
708
708
|
"xuda_notification",
|
|
709
709
|
notification_id
|
|
710
710
|
);
|
|
711
|
-
const
|
|
711
|
+
const delete_notification = async function () {
|
|
712
712
|
doc.stat = 4;
|
|
713
713
|
await db_module.save_couch_doc("xuda_notification", doc);
|
|
714
714
|
};
|
|
@@ -716,7 +716,11 @@ exports.notifications_validation_fx = async function (notification_id) {
|
|
|
716
716
|
if (code < 0) return;
|
|
717
717
|
|
|
718
718
|
if (!doc.topic) {
|
|
719
|
-
await
|
|
719
|
+
await delete_notification();
|
|
720
|
+
return false;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
if (!fx[doc.topic]) {
|
|
720
724
|
return false;
|
|
721
725
|
}
|
|
722
726
|
|
|
@@ -724,7 +728,5 @@ exports.notifications_validation_fx = async function (notification_id) {
|
|
|
724
728
|
new_version_available: async function () {},
|
|
725
729
|
};
|
|
726
730
|
|
|
727
|
-
|
|
728
|
-
return await fx[doc.topic]();
|
|
729
|
-
}
|
|
731
|
+
return await fx[doc.topic]();
|
|
730
732
|
};
|