@resolveio/server-lib 5.0.0-rc-1 → 5.0.0-rc-2
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.
|
@@ -711,9 +711,6 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
711
711
|
var _this = this;
|
|
712
712
|
return __generator(this, function (_c) {
|
|
713
713
|
that = this;
|
|
714
|
-
if (subscription.publication !== 'superadminAPM' && subscription.publication !== 'loggedInUsers') {
|
|
715
|
-
that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection, JSON.stringify(subscription.subscriptionData));
|
|
716
|
-
}
|
|
717
714
|
if (!that._publications[subscription.publication].ws_specific) { // Same pub for all users
|
|
718
715
|
if (this._subCache.some(function (a) { return a.publication === subscription.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(subscription.subscriptionData); })) {
|
|
719
716
|
serverRes = {
|
|
@@ -724,6 +721,9 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
724
721
|
this.sendWS(ws, serverRes);
|
|
725
722
|
}
|
|
726
723
|
else {
|
|
724
|
+
if (subscription.publication !== 'superadminAPM' && subscription.publication !== 'loggedInUsers') {
|
|
725
|
+
that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection, JSON.stringify(subscription.subscriptionData));
|
|
726
|
+
}
|
|
727
727
|
(_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
|
|
728
728
|
_this._subCache.push({ publication: subscription.publication, subscriptionData: subscription.subscriptionData, res: res });
|
|
729
729
|
var serverRes = {
|
|
@@ -772,9 +772,6 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
772
772
|
var _this = this;
|
|
773
773
|
return __generator(this, function (_b) {
|
|
774
774
|
that = this;
|
|
775
|
-
if (subscription.publication !== 'superadminAPM' && subscription.publication !== 'loggedInUsers') {
|
|
776
|
-
that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection, JSON.stringify(subscription.subscriptionData));
|
|
777
|
-
}
|
|
778
775
|
if (this._subCache.some(function (a) { return a.publication === subscription.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(subscription.subscriptionData); })) {
|
|
779
776
|
subscription.clients.forEach(function (client) {
|
|
780
777
|
that._wss.clients.forEach(function (ws) {
|
|
@@ -790,6 +787,9 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
790
787
|
});
|
|
791
788
|
}
|
|
792
789
|
else {
|
|
790
|
+
if (subscription.publication !== 'superadminAPM' && subscription.publication !== 'loggedInUsers') {
|
|
791
|
+
that._mainServer.getMethodManager().callMethodInternal('insertSubscriptionLog', type, subscription.publication, collection, JSON.stringify(subscription.subscriptionData));
|
|
792
|
+
}
|
|
793
793
|
(_a = that._publications[subscription.publication].function).call.apply(_a, [Object.assign({}, that, SubscriptionManager.prototype)].concat(subscription.subscriptionData)).then(function (res) {
|
|
794
794
|
_this._subCache.push({ publication: subscription.publication, subscriptionData: subscription.subscriptionData, res: res });
|
|
795
795
|
subscription.clients.forEach(function (client) {
|