Socket
Socket
Sign inDemoInstall

@prifina/messaging

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prifina/messaging - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

51

dist/cjs/Data.js

@@ -106,3 +106,3 @@ 'use strict';

_ref2.fieldsList;
var uuid = _ref2.uuid;
_ref2.uuid;

@@ -115,8 +115,7 @@ if (stage === "dev") {

receiverMsgs = JSON.parse(msgs).filter(function (m) {
console.log(uuid, m); //console.log(m?.status === undefined);
//console.log(uuid, m);
//console.log(m?.status === undefined);
if (typeof filter !== "undefined" && Object.keys(filter).length > 0) {
console.log("UNREAD FILTER ", filter);
if (m.receiver === uuid && ((m === null || m === void 0 ? void 0 : m.status) === undefined || m.status === 0)) {
//console.log("UNREAD FILTER ", filter);
if ((m === null || m === void 0 ? void 0 : m.status) === undefined || m.status === 0) {
var filterMatch = false;

@@ -134,4 +133,2 @@ Object.keys(filter).forEach(function (f) {

return filterMatch;
} else if (m.sender === uuid) {
return true;
} else {

@@ -141,3 +138,3 @@ return false;

} else {
return m.receiver === uuid && ((m === null || m === void 0 ? void 0 : m.status) === undefined || m.status === 0);
return (m === null || m === void 0 ? void 0 : m.status) === undefined || m.status === 0;
}

@@ -173,25 +170,17 @@ });

receiverMsgs = JSON.parse(msgs).filter(function (m) {
console.log(uuid, m);
//console.log(uuid, m);
if (typeof filter !== "undefined" && Object.keys(filter).length > 0) {
console.log("MSG FILTER ", filter);
//console.log("MSG FILTER ", filter);
var filterMatch = false;
Object.keys(filter).forEach(function (f) {
console.log("UNREAD FILTER MATCH ", f);
console.log("UNREAD FILTER MATCH ", m.hasOwnProperty(f));
if (m.receiver === uuid) {
var filterMatch = false;
Object.keys(filter).forEach(function (f) {
console.log("UNREAD FILTER MATCH ", f);
console.log("UNREAD FILTER MATCH ", m.hasOwnProperty(f));
if (m.hasOwnProperty(f) && m[f] === filter[f]) {
filterMatch = true;
} else {
filterMatch = false;
}
});
return filterMatch;
} else if (m.sender === uuid) {
return true;
} else {
return false;
}
if (m.hasOwnProperty(f) && m[f] === filter[f]) {
filterMatch = true;
} else {
filterMatch = false;
}
});
return filterMatch;
} else {

@@ -251,2 +240,3 @@ //console.log(m?.status === undefined);

body: variables.body,
chatId: variables.chatId,
sender: uuid,

@@ -303,2 +293,3 @@ receiver: variables.receiver,

body: variables.body,
chatId: variables.chatId,
sender: variables.sender,

@@ -305,0 +296,0 @@ receiver: uuid,

@@ -102,3 +102,3 @@ var getInfo = function getInfo() {

_ref2.fieldsList;
var uuid = _ref2.uuid;
_ref2.uuid;

@@ -111,8 +111,7 @@ if (stage === "dev") {

receiverMsgs = JSON.parse(msgs).filter(function (m) {
console.log(uuid, m); //console.log(m?.status === undefined);
//console.log(uuid, m);
//console.log(m?.status === undefined);
if (typeof filter !== "undefined" && Object.keys(filter).length > 0) {
console.log("UNREAD FILTER ", filter);
if (m.receiver === uuid && ((m === null || m === void 0 ? void 0 : m.status) === undefined || m.status === 0)) {
//console.log("UNREAD FILTER ", filter);
if ((m === null || m === void 0 ? void 0 : m.status) === undefined || m.status === 0) {
var filterMatch = false;

@@ -130,4 +129,2 @@ Object.keys(filter).forEach(function (f) {

return filterMatch;
} else if (m.sender === uuid) {
return true;
} else {

@@ -137,3 +134,3 @@ return false;

} else {
return m.receiver === uuid && ((m === null || m === void 0 ? void 0 : m.status) === undefined || m.status === 0);
return (m === null || m === void 0 ? void 0 : m.status) === undefined || m.status === 0;
}

@@ -169,25 +166,17 @@ });

receiverMsgs = JSON.parse(msgs).filter(function (m) {
console.log(uuid, m);
//console.log(uuid, m);
if (typeof filter !== "undefined" && Object.keys(filter).length > 0) {
console.log("MSG FILTER ", filter);
//console.log("MSG FILTER ", filter);
var filterMatch = false;
Object.keys(filter).forEach(function (f) {
console.log("UNREAD FILTER MATCH ", f);
console.log("UNREAD FILTER MATCH ", m.hasOwnProperty(f));
if (m.receiver === uuid) {
var filterMatch = false;
Object.keys(filter).forEach(function (f) {
console.log("UNREAD FILTER MATCH ", f);
console.log("UNREAD FILTER MATCH ", m.hasOwnProperty(f));
if (m.hasOwnProperty(f) && m[f] === filter[f]) {
filterMatch = true;
} else {
filterMatch = false;
}
});
return filterMatch;
} else if (m.sender === uuid) {
return true;
} else {
return false;
}
if (m.hasOwnProperty(f) && m[f] === filter[f]) {
filterMatch = true;
} else {
filterMatch = false;
}
});
return filterMatch;
} else {

@@ -247,2 +236,3 @@ //console.log(m?.status === undefined);

body: variables.body,
chatId: variables.chatId,
sender: uuid,

@@ -299,2 +289,3 @@ receiver: variables.receiver,

body: variables.body,
chatId: variables.chatId,
sender: variables.sender,

@@ -301,0 +292,0 @@ receiver: uuid,

{
"name": "@prifina/messaging",
"version": "0.0.6",
"version": "0.0.7",
"description": "Prifina Messaging Component",

@@ -51,3 +51,3 @@ "author": "Tero <tero@prifina.com>",

},
"gitHead": "3659a49ad4d1a6686ec78aee1d7035ef77aa7db7"
"gitHead": "efeb04938b9697d94d72eeb034ce2ed0d6600f37"
}

@@ -122,10 +122,7 @@ export const getInfo = () => {

receiverMsgs = JSON.parse(msgs).filter((m) => {
console.log(uuid, m);
//console.log(uuid, m);
//console.log(m?.status === undefined);
if (typeof filter !== "undefined" && Object.keys(filter).length > 0) {
console.log("UNREAD FILTER ", filter);
if (
m.receiver === uuid &&
(m?.status === undefined || m.status === 0)
) {
//console.log("UNREAD FILTER ", filter);
if (m?.status === undefined || m.status === 0) {
let filterMatch = false;

@@ -142,4 +139,2 @@ Object.keys(filter).forEach((f) => {

return filterMatch;
} else if (m.sender === uuid) {
return true;
} else {

@@ -149,5 +144,3 @@ return false;

} else {
return (
m.receiver === uuid && (m?.status === undefined || m.status === 0)
);
return m?.status === undefined || m.status === 0;
}

@@ -182,22 +175,17 @@ });

receiverMsgs = JSON.parse(msgs).filter((m) => {
console.log(uuid, m);
//console.log(uuid, m);
if (typeof filter !== "undefined" && Object.keys(filter).length > 0) {
console.log("MSG FILTER ", filter);
if (m.receiver === uuid) {
let filterMatch = false;
Object.keys(filter).forEach((f) => {
console.log("UNREAD FILTER MATCH ", f);
console.log("UNREAD FILTER MATCH ", m.hasOwnProperty(f));
if (m.hasOwnProperty(f) && m[f] === filter[f]) {
filterMatch = true;
} else {
filterMatch = false;
}
});
return filterMatch;
} else if (m.sender === uuid) {
return true;
} else {
return false;
}
//console.log("MSG FILTER ", filter);
let filterMatch = false;
Object.keys(filter).forEach((f) => {
console.log("UNREAD FILTER MATCH ", f);
console.log("UNREAD FILTER MATCH ", m.hasOwnProperty(f));
if (m.hasOwnProperty(f) && m[f] === filter[f]) {
filterMatch = true;
} else {
filterMatch = false;
}
});
return filterMatch;
} else {

@@ -257,2 +245,3 @@ //console.log(m?.status === undefined);

body: variables.body,
chatId: variables.chatId,
sender: uuid,

@@ -308,2 +297,3 @@ receiver: variables.receiver,

body: variables.body,
chatId: variables.chatId,
sender: variables.sender,

@@ -310,0 +300,0 @@ receiver: uuid,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc