quickblox 2.17.6-logger → 2.17.7-logger
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/package.json +1 -1
- package/quickblox.js +33 -19
- package/quickblox.min.js +1 -1
- package/src/modules/chat/qbChat.js +16 -16
- package/src/qbConfig.js +1 -1
- package/src/qbStrophe.js +16 -2
package/package.json
CHANGED
package/quickblox.js
CHANGED
|
@@ -43352,12 +43352,12 @@ function ChatProxy(service) {
|
|
|
43352
43352
|
}
|
|
43353
43353
|
|
|
43354
43354
|
// MUC presences go here
|
|
43355
|
-
if (xXMLNS && xXMLNS ==
|
|
43355
|
+
if (xXMLNS && xXMLNS == 'http://jabber.org/protocol/muc#user') {
|
|
43356
43356
|
dialogId = self.helpers.getDialogIdFromNode(from);
|
|
43357
43357
|
userId = self.helpers.getUserIdFromRoomJid(from);
|
|
43358
43358
|
|
|
43359
43359
|
// KICK from dialog event
|
|
43360
|
-
if (status && statusCode ==
|
|
43360
|
+
if (status && statusCode == '301') {
|
|
43361
43361
|
if (typeof self.onKickOccupant === 'function') {
|
|
43362
43362
|
var actorElement = chatUtils.getElement(chatUtils.getElement(x, 'item'), 'actor');
|
|
43363
43363
|
var initiatorUserJid = chatUtils.getAttr(actorElement, 'jid');
|
|
@@ -43813,7 +43813,7 @@ ChatProxy.prototype = {
|
|
|
43813
43813
|
self.isConnected = false;
|
|
43814
43814
|
self._isConnecting = false;
|
|
43815
43815
|
self._chatPingFailedCounter = 0;
|
|
43816
|
-
self._establishConnection(params);
|
|
43816
|
+
self._establishConnection(params,'CONNECTED have SDK ping failed');
|
|
43817
43817
|
}
|
|
43818
43818
|
} else {
|
|
43819
43819
|
Utils.QBLog('[QBChat]',
|
|
@@ -43885,7 +43885,7 @@ ChatProxy.prototype = {
|
|
|
43885
43885
|
self.connection.reset();
|
|
43886
43886
|
|
|
43887
43887
|
// reconnect to chat and enable check connection
|
|
43888
|
-
self._establishConnection(params);
|
|
43888
|
+
self._establishConnection(params,'DISCONNECTED');
|
|
43889
43889
|
|
|
43890
43890
|
break;
|
|
43891
43891
|
case Strophe.Status.ATTACHED:
|
|
@@ -44014,7 +44014,7 @@ ChatProxy.prototype = {
|
|
|
44014
44014
|
self._isConnecting = false;
|
|
44015
44015
|
|
|
44016
44016
|
// reconnect to chat and enable check connection
|
|
44017
|
-
self._establishConnection(params);
|
|
44017
|
+
self._establishConnection(params,'NODE:DISCONNECTED');
|
|
44018
44018
|
});
|
|
44019
44019
|
|
|
44020
44020
|
self.Client.on('error', function () {
|
|
@@ -44096,39 +44096,39 @@ ChatProxy.prototype = {
|
|
|
44096
44096
|
}
|
|
44097
44097
|
},
|
|
44098
44098
|
|
|
44099
|
-
_establishConnection: function (params) {
|
|
44099
|
+
_establishConnection: function (params, description) {
|
|
44100
44100
|
var self = this;
|
|
44101
|
-
Utils.QBLog('[QBChat]', '_establishConnection called');
|
|
44101
|
+
Utils.QBLog('[QBChat]', '_establishConnection called in ' + description);
|
|
44102
44102
|
if (typeof self.onLogListener === 'function') {
|
|
44103
44103
|
Utils.safeCallbackCall(self.onLogListener,
|
|
44104
|
-
'[QBChat]' + '_establishConnection called');
|
|
44104
|
+
'[QBChat]' + '_establishConnection called in ' + description);
|
|
44105
44105
|
}
|
|
44106
44106
|
if (self._isLogout || self._checkConnectionTimer) {
|
|
44107
44107
|
Utils.QBLog('[QBChat]', '_establishConnection return');
|
|
44108
44108
|
if (typeof self.onLogListener === 'function') {
|
|
44109
44109
|
Utils.safeCallbackCall(self.onLogListener,
|
|
44110
|
-
'[QBChat]' + ' _establishConnection
|
|
44111
|
-
self._isLogout+' and self._checkConnectionTimer ' +self._checkConnectionTimer?
|
|
44110
|
+
'[QBChat]' + 'BREAK _establishConnection RETURN with self._isLogout: '+
|
|
44111
|
+
self._isLogout?self._isLogout:'undefined'+' and self._checkConnectionTimer ' +self._checkConnectionTimer?self._checkConnectionTimer:'undefined');
|
|
44112
44112
|
}
|
|
44113
44113
|
return;
|
|
44114
44114
|
}
|
|
44115
44115
|
|
|
44116
44116
|
var _connect = function () {
|
|
44117
|
-
Utils.QBLog('[QBChat]', 'call _connect() in _establishConnection ');
|
|
44117
|
+
Utils.QBLog('[QBChat]', 'call _connect() in _establishConnection in '+description);
|
|
44118
44118
|
if (typeof self.onLogListener === 'function') {
|
|
44119
44119
|
Utils.safeCallbackCall(self.onLogListener,
|
|
44120
|
-
'[QBChat]' + ' call _connect() in _establishConnection ');
|
|
44120
|
+
'[QBChat]' + ' call _connect() in _establishConnection in '+description);
|
|
44121
44121
|
}
|
|
44122
44122
|
if (!self.isConnected && !self._isConnecting && !self._sessionHasExpired) {
|
|
44123
|
-
Utils.QBLog('[QBChat]', ' start
|
|
44123
|
+
Utils.QBLog('[QBChat]', ' start EXECUTE connect() in _establishConnection ');
|
|
44124
44124
|
if (typeof self.onLogListener === 'function') {
|
|
44125
44125
|
Utils.safeCallbackCall(self.onLogListener,
|
|
44126
|
-
'[QBChat]' + '
|
|
44126
|
+
'[QBChat]' + ' start EXECUTE connect() in _establishConnection in '+description+' self.isConnected: '+self.isConnected+' self._isConnecting: '+self._isConnecting+' self._sessionHasExpired: '+self._sessionHasExpired);
|
|
44127
44127
|
}
|
|
44128
44128
|
self.connect(params);
|
|
44129
44129
|
if (typeof self.onLogListener === 'function') {
|
|
44130
44130
|
Utils.safeCallbackCall(self.onLogListener,
|
|
44131
|
-
'[QBChat]' + 'call _connect() in _establishConnection is executed');
|
|
44131
|
+
'[QBChat]' + 'call _connect() in _establishConnection in '+description+' is executed');
|
|
44132
44132
|
}
|
|
44133
44133
|
} else {
|
|
44134
44134
|
Utils.QBLog('[QBChat]', 'stop timer in _establishConnection ');
|
|
@@ -44136,7 +44136,7 @@ ChatProxy.prototype = {
|
|
|
44136
44136
|
self._checkConnectionTimer = undefined;
|
|
44137
44137
|
if (typeof self.onLogListener === 'function') {
|
|
44138
44138
|
Utils.safeCallbackCall(self.onLogListener,
|
|
44139
|
-
'[QBChat]' + 'stop timer in _establishConnection ');
|
|
44139
|
+
'[QBChat]' + 'stop timer in _establishConnection in '+description);
|
|
44140
44140
|
}
|
|
44141
44141
|
}
|
|
44142
44142
|
};
|
|
@@ -51484,7 +51484,7 @@ module.exports = StreamManagement;
|
|
|
51484
51484
|
*/
|
|
51485
51485
|
|
|
51486
51486
|
var config = {
|
|
51487
|
-
version: '2.17.
|
|
51487
|
+
version: '2.17.7-logger',
|
|
51488
51488
|
buildNumber: '1161',
|
|
51489
51489
|
creds: {
|
|
51490
51490
|
'appId': 0,
|
|
@@ -52207,6 +52207,10 @@ function Connection(onLogListener) {
|
|
|
52207
52207
|
if (data.childNodes[0]) {
|
|
52208
52208
|
for (var i = 0, len = data.childNodes.length; i < len; i++) {
|
|
52209
52209
|
Utils.QBLog('[QBChat]', 'RECV:', data.childNodes[i]);
|
|
52210
|
+
if (onLogListener && typeof onLogListener === 'function') {
|
|
52211
|
+
Utils.safeCallbackCall(onLogListener,
|
|
52212
|
+
'[QBChat][QBStrophe]' + 'RECV:' + data.childNodes[i]);
|
|
52213
|
+
}
|
|
52210
52214
|
}
|
|
52211
52215
|
}
|
|
52212
52216
|
};
|
|
@@ -52214,13 +52218,20 @@ function Connection(onLogListener) {
|
|
|
52214
52218
|
if (data.childNodes[0]) {
|
|
52215
52219
|
for (var i = 0, len = data.childNodes.length; i < len; i++) {
|
|
52216
52220
|
Utils.QBLog('[QBChat]', 'SENT:', data.childNodes[i]);
|
|
52221
|
+
if (onLogListener && typeof onLogListener === 'function') {
|
|
52222
|
+
Utils.safeCallbackCall(onLogListener,
|
|
52223
|
+
'[QBChat][QBStrophe]' + 'SENT:' + data.childNodes[i]);
|
|
52224
|
+
}
|
|
52217
52225
|
}
|
|
52218
52226
|
}
|
|
52219
52227
|
};
|
|
52220
52228
|
} else {
|
|
52221
52229
|
conn.xmlInput = function(data) {
|
|
52222
52230
|
Utils.QBLog('[QBChat]', 'RECV:', data);
|
|
52223
|
-
|
|
52231
|
+
if (onLogListener && typeof onLogListener === 'function') {
|
|
52232
|
+
Utils.safeCallbackCall(onLogListener,
|
|
52233
|
+
'[QBChat][QBStrophe]' + 'RECV:' + data);
|
|
52234
|
+
}
|
|
52224
52235
|
try {
|
|
52225
52236
|
let parser = new DOMParser();
|
|
52226
52237
|
let xmlDoc = parser.parseFromString(data, 'text/xml');
|
|
@@ -52240,10 +52251,13 @@ function Connection(onLogListener) {
|
|
|
52240
52251
|
} catch (e) {
|
|
52241
52252
|
console.error('Error parsing XML input:', e);
|
|
52242
52253
|
}
|
|
52243
|
-
//
|
|
52244
52254
|
};
|
|
52245
52255
|
conn.xmlOutput = function(data) {
|
|
52246
52256
|
Utils.QBLog('[QBChat]', 'SENT:', data);
|
|
52257
|
+
if (onLogListener && typeof onLogListener === 'function') {
|
|
52258
|
+
Utils.safeCallbackCall(onLogListener,
|
|
52259
|
+
'[QBChat][QBStrophe]' + 'SENT:' + data);
|
|
52260
|
+
}
|
|
52247
52261
|
};
|
|
52248
52262
|
}
|
|
52249
52263
|
|