comprodls-sdk 2.75.0 → 2.75.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.
package/dist/comprodls-sdk.js
CHANGED
|
@@ -12880,6 +12880,7 @@ function grantByUserOrgId(options) {
|
|
|
12880
12880
|
var channelName = baseChannelName + allowedChannels[i] + "\\..*";
|
|
12881
12881
|
patterns.push(channelName);
|
|
12882
12882
|
}
|
|
12883
|
+
console.log("0a781d69 TAKING GRANT FOR CHANNEL PATTERNS: ", patterns);
|
|
12883
12884
|
options.channels = {};
|
|
12884
12885
|
options.channels.patterns = patterns;
|
|
12885
12886
|
grantV2.call(this, options)
|
|
@@ -13073,6 +13074,7 @@ module.exports = function () {
|
|
|
13073
13074
|
//Returning the adaptor (Plain Javascript object)
|
|
13074
13075
|
return {
|
|
13075
13076
|
"on": function (channelObj, handler) {
|
|
13077
|
+
console.log("0a781d69 PARAMS OF .on FUNCTION: ", JSON.stringify(channelObj, null, 2));
|
|
13076
13078
|
var pubNubChannel;
|
|
13077
13079
|
var channelContext = [];
|
|
13078
13080
|
|
|
@@ -13094,6 +13096,7 @@ module.exports = function () {
|
|
|
13094
13096
|
status: 'pending'
|
|
13095
13097
|
};
|
|
13096
13098
|
_eventEmitter.on(pubNubChannel, handler);
|
|
13099
|
+
console.log("0a781d69 GOING TO SUBSCRIBE ON PUBNUB CHANNEL: ", pubNubChannel);
|
|
13097
13100
|
_subscribeToPubNubChannels(pubNubChannel);
|
|
13098
13101
|
}
|
|
13099
13102
|
}
|
|
@@ -13114,6 +13117,7 @@ module.exports = function () {
|
|
|
13114
13117
|
|
|
13115
13118
|
var _translatePubnubStatus = function(status, options) {
|
|
13116
13119
|
var channels = [], error, successObj;
|
|
13120
|
+
console.log('0a781d69 PUBNUB STATUS: ', JSON.stringify(status, null, 4));
|
|
13117
13121
|
switch (status.category) {
|
|
13118
13122
|
case "PNConnectedCategory":
|
|
13119
13123
|
if(status.operation === "PNSubscribeOperation") {
|
|
@@ -13250,9 +13254,14 @@ module.exports = function () {
|
|
|
13250
13254
|
var token = userOptions.token;
|
|
13251
13255
|
|
|
13252
13256
|
if (!_pubnubClient && pubnubConfig) {
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13257
|
+
try {
|
|
13258
|
+
_pubnubClient = new pubNub(pubnubConfig); //Connect with PubNub SDK
|
|
13259
|
+
_pubnubClient.setToken(token);
|
|
13260
|
+
setTimeout(processSetup, 1000);
|
|
13261
|
+
processSetup();
|
|
13262
|
+
} catch(err) {
|
|
13263
|
+
console.error('0a781d69 ERROR WHILE CONFIGURING PUBNUB: ', JSON.stringify(err, null, 2));
|
|
13264
|
+
}
|
|
13256
13265
|
} else {
|
|
13257
13266
|
return new Error('Already Initialized');
|
|
13258
13267
|
}
|