@xuda.io/notification_module 1.1.51 → 1.1.53
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 +8 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -704,16 +704,22 @@ exports.get_system_notifications = async function (req) {
|
|
|
704
704
|
// module.exports = notifications_validation_class;
|
|
705
705
|
|
|
706
706
|
exports.notifications_validation_fx = async function (notification_id) {
|
|
707
|
-
|
|
707
|
+
let { code, doc } = await db_module.get_couch_doc(
|
|
708
708
|
"xuda_notification",
|
|
709
709
|
notification_id
|
|
710
710
|
);
|
|
711
711
|
|
|
712
|
+
if (code < 0) return;
|
|
713
|
+
|
|
714
|
+
if (!doc.topic) {
|
|
715
|
+
doc.stat = 4;
|
|
716
|
+
}
|
|
717
|
+
|
|
712
718
|
const fx = {
|
|
713
719
|
new_version_available: async function () {},
|
|
714
720
|
};
|
|
715
721
|
|
|
716
722
|
if (fx[method]) {
|
|
717
|
-
return await fx[
|
|
723
|
+
return await fx[doc.topic]();
|
|
718
724
|
}
|
|
719
725
|
};
|